[torqueusers] Queue script job

Gus Correa gus at ldeo.columbia.edu
Thu Dec 9 11:52:14 MST 2010

Troy Baer wrote:
> On Thu, 2010-12-09 at 12:08 +0100, Guille wrote:
>> How i can make a PBS script to make him wait to run till another job
>> in the same qeue has finished.
>> I mean for exemple: on queue1 i have job1 running, and i want to job2
>> to wait till job1 has finished to be executed.
> Please take a look at the qsub man page, specifically the section about
> -W depend=.
> 	--Troy

Hi Guille

Besides the -W depend=[afterok, etc] that Troy suggests,
if you are running a series of jobs where the new one
continues the work done by the previous, you may
resubmit the job from your Torque/PBS script,
instead of queuing up the whole series at once.

Something like this:

#PBS ...
mpirun -np 32 ./myprogram
qsub myjob.pbs (or qsub $0)

To make this work, first you need to do:

qmgr -c 'set server allow_node_submit = True'

if this server attribute is not yet set this way.

We use both mechanisms here, depending on what is needed.

My two cents,
Gus Correa

More information about the torqueusers mailing list