LSF Version 7.3 - Administering Platform LSF
Dependency Conditions
450 Administering Platform LSF
The dependency expression is a logical expression composed of one or more
dependency conditions. For syntax of individual dependency conditions, see
Dependency Conditions on page 450.
◆ To make dependency expression of multiple conditions, use the following
logical operators:
❖ && (AND)
❖ || (OR)
❖ ! (NOT)
◆ Use parentheses to indicate the order of operations, if necessary.
◆ Enclose the dependency expression in single quotes (') to prevent the shell from
interpreting special characters (space, any logic operator, or parentheses). If
you use single quotes for the dependency expression, use double quotes for
quoted items within it, such as job names.
◆ Job names specify only your own jobs, unless you are an LSF administrator.
◆ Use double quotes (") around job names that begin with a number.
◆ In Windows, enclose the dependency expression in double quotes (") when the
expression contains a space. For example:
❖ bsub -w "exit(678, 0)" requires double quotes in Windows.
❖ bsub -w 'exit(678,0)' can use single quotes in Windows.
◆ In the job name, specify the wildcard character (*) at the end of a string, to
indicate all jobs whose name begins with the string. For example, if you use
jobA* as the job name, it specifies jobs named jobA, jobA1, jobA_test,
jobA.log, etc.
Multiple jobs with the same name
By default, if you use the job name to specify a dependency condition, and more
than one of your jobs has the same name, all of your jobs that have that name must
satisfy the test.
To change this behavior, set JOB_DEP_LAST_SUB in
lsb.params to 1. Then, if
more than one of your jobs has the same name, the test is done on the one submitted
most recently.
Dependency Conditions
The following dependency conditions can be used with any job:
◆ done(job_ID | "job_name")
◆ ended(job_ID | "job_name")
◆ exit(job_ID [,[op] exit_code])
◆ exit("job_name"[,[op] exit_code])
◆ external(job_ID | "job_name", "status_text")
◆ job_ID | "job_name"
◆ post_done(job_ID | "job_name")
◆ post_err(job_ID | "job_name")