Dear all,

I have a Perl code that take some parameters. I would then run this code on few parameter sets on a Linux Cluster - comprising 40 CPUs. Finally, I would con-cat-enate the result into one single file.

Here is the general steps I would do:
1. Perl code is executed in this way individually.
$ perl mycode.pl file1.txt param1 param2 > param_set1.out $ perl mycode.pl file1.txt param3 param4 > param_set3.out $ perl mycode.pl file1.txt param4 param5 > param_set4.out $ cat param_set1.out param_set3.out param_set4.out > final.out
Here we have param_set1 = (param1,param2), etc. There are many of these param sets. For each of this param set I would run on Linux Cluster via qsub command.

2. Before running qsub command I have this bash script required by qsub to do his job. Let's call this script "runcode.sh".
#!/usr/bin/bash cd ~/some_dir perl mycode.pl $1 $2 > ~/some_out_dir/param_set$1.out
3. Subsequently I would manually submit each param set to the cluster as in shown in step 1 as follows:
$ qsub runcode.sh param1 param2 $ qsub runcode.sh param3 param4 $ qsub runcode.sh param5 param6
My question is how can I write a Perl script that:

Regards,
Edward

In reply to Running Parallel Perl Script on Linux Cluster by monkfan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.