To expand the answer to Michael Klasson’s question, here you will find the bsub -w option, which allows you to submit a task that will be scheduled only if some dependency condition is met.
The most common terms of use are the exit status of some other task, if you name each of your tasks "foo $ i" with -J:
bsub -q someq -J "job_1" foo 1 bsub -q someq -J "job_2" foo 2 bsub -q someq -J "job_3" foo 3
Then you can send another task, which depends on the exit status of these tasks as follows:
bsub -q someq -w "done(job_1) && done(job_2) && done(job_3)" wrapup
This tells LSF to only schedule a wrapping if jobs with the names job_1, job_2 and job_3 end with DONE status. You can also use the job id instead of job names or specify the specific status you want to check with expressions like
done("job_1") // termination status is DONE exit("job_1") // termination status is EXIT ended("job_1") // termination status is EXIT or DONE
And combine them with the logical operators &, || ,!
Squirrel
source share