When qsub
-ing a job I want one job to wait to execute until the first one has succeeded. I've been looking at the options -hold_jid_ad
and -hold_jid
to do this, but can't see a difference in them.
Lets say you have jobs A
and B
, and A
depends on B
. That is you want to run something like qsub --hold_jid[_ad] B A.sh
This is for array jobs only. Use it if:
A
and B
are both array jobs,A
and B
has the same range of tasts (i.e. not qsub -t 1-3 A.sh
and qsub -t 2-4 B.sh
),A[i]
depends on B[i]
, ANDA[i]
does not depend on B[j]
for i != j
Use this is any other situation. When in doubt use this.
This is based on a diff the documentation and a few tries on our engine.