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.
Asked
Active
Viewed 3,007 times
6

Kevin L. Keys
- 997
- 8
- 21

rainkinz
- 10,082
- 5
- 45
- 73
2 Answers
10
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
--hold_jid_ad
This is for array jobs only. Use it if:
A
andB
are both array jobs,A
andB
has the same range of tasts (i.e. notqsub -t 1-3 A.sh
andqsub -t 2-4 B.sh
),A[i]
depends onB[i]
, ANDA[i]
does not depend onB[j]
fori != j
--hold_jid
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.

Tobber
- 7,211
- 8
- 33
- 56
-
in `qsub --hold_jid B A.sh` is there a way to pass arguments to `A.sh`? – gaitat Apr 09 '18 at 23:53
0
Difference in man page is subtle. It appears that -hold_jid_ad
is for job array, whereas -hold_jid
is for a regular job type.

Kevin L. Keys
- 997
- 8
- 21

Vince
- 3,325
- 2
- 23
- 41