Torque job with dependencies on job array
Asked Answered
R

1

6

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.

Rambler answered 7/11, 2016 at 18:36 Comment(0)
R
7

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

Rambler answered 8/11, 2016 at 2:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.