Sequential execution of the Parallel or serial jobs on OpenPBS / Torque


If you have an requirement to execute jobs in sequence after the 1st job has completed, only then the 2nd job can launch, you can  use the -W command

For example, if you have a running job with a job ID 12345, and you run the next job to run only after job 12345 run.

$ qsub -q clusterqueue -l nodes=1:ppn=8 -W depend=afterany:12345 parallel.sh -v file=mybinaryfile

You will notice that the job will hold until the 1st job executed.

.....
.....
24328 kittycool Hold 2 10:00:00:00 Sat Mar 2 02:20:12

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.