Search code examples
lsf

LSF: Dependent Job with failed dependency


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.


Solution

  • 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.