Reputation: 581
I have 2 jobs Job1 and Job2,
Job2 depend on "done(Job1->id)",
If Job 1 errored out and has a status of exit instead of done, how do I get job2 to exit too?
Currently I see that J2 is stuck in pend state.
Upvotes: 1
Views: 286
Reputation: 932
You can use the orphaned job termination feature. Submit your second job with
bsub -w 'done(Job1->id)' -ti ...
Then if Job1 fails, Job2 will be killed right away.
Upvotes: 1