[torqueusers] question about submitting multiple jobs (a.k.a job array)

Glen Beane glen.beane at gmail.com
Thu Aug 4 09:33:30 MDT 2011


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20110804/f5f2a90c/attachment.html 


More information about the torqueusers mailing list