Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Torque job with dependencies on job array

I'm trying to submit a torque job that is dependent on an array completing.

FIRST=`qsub -q hep -t 1-5 foo.sh`
qsub -q hep -W depend=afterok:$FIRST bar.sh

The FIRST job array submits and completes just fine but the second job bar.sh just holds indefinitely.

If I remove the array option from the first argument the second job will succeed as planned but this does not really solve the problem.

There was a similar thread from 3 years ago but it seems that there was no actual resolution:
How to wait for a torque job array to complete

Thanks for your help.

like image 898
J. Vasquez Avatar asked Nov 07 '16 18:11

J. Vasquez


1 Answers

Found the answer, the depend argument must be afterokarray. The example below works.

FIRST=`qsub -q hep -t 1-5 foo.sh`
qsub -q hep -W depend=afterokarray:$FIRST bar.sh

like image 88
J. Vasquez Avatar answered Oct 13 '22 13:10

J. Vasquez