[torqueusers] question about submitting multiple jobs (a.k.a job array)
Mahmood Naderan
nt_mahmood at yahoo.com
Thu Aug 4 12:00:59 MDT 2011
ok thanks
// Naderan *Mahmood;
________________________________
From: Glen Beane <glen.beane at gmail.com>
To: Mahmood Naderan <nt_mahmood at yahoo.com>; Torque Users Mailing List <torqueusers at supercluster.org>
Sent: Thursday, August 4, 2011 8:05 PM
Subject: Re: [torqueusers] question about submitting multiple jobs (a.k.a job array)
On Thu, Aug 4, 2011 at 11:33 AM, Glen Beane <glen.beane at gmail.com> wrote:
>
>
>On Thu, Aug 4, 2011 at 7:44 AM, Mahmood Naderan <nt_mahmood at yahoo.com> wrote:
>
>Hi
>>I am looking for some example to submit multiple jobs as stated in http://www.clusterresources.com/torquedocs21/2.1jobsubmission.shtml#jobarrays
>>
>>For example, I have to jobs:
>>job1 >>
>>#PBS -q Q1
>>cd $PBS_O_WORKDIR
>>./run -bench1
>>
>>job2 >>
>>#PBS -q Q2
>>cd $PBS_O_WORKDIR
>>./run -bench2
>>
>>Normally I use
>>
>>qsub job1
>>qsub job2
>>
>>
>>Now I want to submit them with one qsub command.
>>It is stated that I have to use "qsub -t 0-1 submit_script.sh"
>>I want to know what is the content of "submit_script.sh" ?
>>Is it
>>
>>#PBS -q Q1
>>cd $PBS_O_WORKDIR
>>./run -bench1#PBS -q Q2
>>cd $PBS_O_WORKDIR
>>./run -bench2
>>
>
>#PBS -q Q1
>#PBS -t 1-2
>
>cd $PBS_O_WORKDIR
>./run -bench${PBS_ARRAYID}
>
>
>notice I passed 1-2 for the -t argument. This means one job will be run with a PBS_ARRAYID of 1, and the other of 2.
>
>
or if you pass -t on the command line to qsub...
#PBS -q Q1
cd $PBS_O_WORKDIR
./run -bench${PBS_ARRAYID}
and submit with qsub -t 1-2 submit_script.sh
The key thing to remember is each job in the job array runs the exact same script. You use the $PBS_ARRAYID variable to take a different action
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20110804/06670ee8/attachment.html
More information about the torqueusers
mailing list