6

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.

Kevin L. Keys
  • 997
  • 8
  • 21
rainkinz
  • 10,082
  • 5
  • 45
  • 73

2 Answers2

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 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], AND
  • A[i] does not depend on B[j] for i != 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
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