Difference between revisions of "Job Arrays"
Jump to navigation
Jump to search
(→EXAMPLE QSUB SCRIPT) |
|||
Line 10: | Line 10: | ||
== EXAMPLE QSUB SCRIPT == | == EXAMPLE QSUB SCRIPT == | ||
− | + | <pre>#!/bin/bash | |
− | < | + | # ----------------QSUB Parameters----------------- # |
+ | #PBS -S /bin/bash | ||
+ | #PBS -q default | ||
+ | #PBS -l nodes=1:ppn=2,mem=1000mb | ||
+ | #PBS -M youremail@illinois.edu | ||
+ | #PBS -m abe | ||
+ | #PBS -N array_of_blast_jobs | ||
+ | # ----------------Load Modules-------------------- # | ||
+ | module load blast/2.2.26 | ||
+ | # ----------------Your Commands------------------- # | ||
+ | perl run_blast_job.pl $PBS_ARRAYID</pre> |
Revision as of 10:13, 13 March 2014
Job Array Example[edit]
Making a new copy of the script and then submitting each one for every input data file is time consuming. An alternative is to make a job array using the -t option in your submission script. The -t option allows many copies of the same script to be queued all at once. You can use the PBS_ARRAYID to differentiate between the different jobs in the array.
Lets say you want to run 16 blast jobs. Instead of submitting 16 different jobs, you can submit one job, but use the -T parameter and the PBS_ARRAYID variable.
The -T parameter sets the range of the PBS_ARRAYID variable. So setting it to 0-15 will cause the qsub script to call the script 16 times, with an input of 0, 1 , 2 ,3
EXAMPLE QSUB SCRIPT[edit]
#!/bin/bash # ----------------QSUB Parameters----------------- # #PBS -S /bin/bash #PBS -q default #PBS -l nodes=1:ppn=2,mem=1000mb #PBS -M youremail@illinois.edu #PBS -m abe #PBS -N array_of_blast_jobs # ----------------Load Modules-------------------- # module load blast/2.2.26 # ----------------Your Commands------------------- # perl run_blast_job.pl $PBS_ARRAYID