BASIC PROBLEM: I want to submit N + 1 jobs to an LSF-managed Linux cluster in such a way that the (N + 1)-st "wrap-up" job is not run until all the preceding N jobs have finished.
EXTRA: If possible, it would be ideal if I could arrange matters so that the (N + 1)-st ("wrap-up") job receives, as its first argument, a value of 0 (say) if all the previous N jobs terminated successfully, and a value different from 0 otherwise.
This problem (or at least the part labeled "BASIC PROBLEM") is vastly simpler than what LSF's bsub
appears to be designed to handle, so I have a hard time wading through the voluminous documentation for bsub
to figure out the simplest way to do what I want to do.
What would be the simplest
bsub
commands to achieve this arrangement?
To be more concrete, what would I have to replace the various ???
slots below to ensure that wrapup
is executed only after all the foo
jobs have finished (ideally with an argument that reflects the ending status of the foo
jobs)?
bsub -q someq ??? foo 1
bsub -q someq ??? foo 2
bsub -q someq ??? foo 3
bsub -q someq ??? wrapup [???]