Platform LSF Administration Guide Version 6.2

Chapter 27
Job Arrays
Administering Platform LSF
421
Job Array Dependencies
Like all jobs in LSF, a job array can be dependent on the completion or partial
completion of a job or another job array. A number of job-array-specific dependency
conditions are provided by LSF.
Whole array dependency
To make a job array dependent on the completion of a job or another job array use the
-w "dependency_condition" option of bsub. For example, to have an array
dependent on the completion of a job or job array with job ID 123, you would use the
following command:
% bsub
-w "done(123)"
-J "myArray2[1-1000]" myJob
Partial array dependency
To make a job or job array dependent on an existing job array you would use one of the
following dependency conditions.
Use one the following operators (
op) combined with a positive integer (num) to build a
condition:
== | > | < | >= |<= | !=
Optionally, an asterisk (*) can be used in place of num to mean all jobs submitted from
the job array.
For example, to start a job named
myJob when 100 or more elements in a job array with
job ID 123 have completed successfully:
% bsub
-w "numdone(123, >= 100)"
myJob
Condition Description
numrun(jobArrayJobId, op num) Evaluate the number of jobs in RUN state
numpend(jobArrayJobId, op num) Evaluate the number of jobs in PEND state
numdone(jobArrayJobId, op num) Evaluate the number of jobs in DONE state
numexit(jobArrayJobId, op num) Evaluate the number of jobs in EXIT state
numended(jobArrayJobId, op num) Evaluate the number of jobs in DONE and EXIT
state
numhold(jobArrayJobId, op num) Evaluate the number of jobs in PSUSP state
numstart(jobArrayJobId, op num) Evaluate the number of jobs in RUN and SSUSP
and USUSP state