bwait

Pauses and waits for the job query condition to be satisfied.

Synopsis

bwait -w "wait_condition" [-t timeout] [-r rereg_interval]
bwait -h | -V

Description

The bwait command pauses and waits for the specified job condition to occur before the command returns. Use the bwait command to reduce workload on the mbatchd daemon by including bwait in a user script for running jobs instead of using the bjobs command in a tight loop to check the job status. For example, the user script might have a command to submit a job, then run bwait to wait for the first job to be DONE before continuing the script.

You can also set the maximum amount of time that the mbatchd daemon takes to evaluate the wait conditions in a scheduling session by specifying the EVALUATE_WAIT_CONDITION_TIMEOUT parameter in the lsb.params file. This limits the amount of time that the wait condition evaluation blocks services and frees up time to perform other services during the scheduling cycle.

Note: By default, LSF can run the bwait command from within a job. Since running jobs can block slots with the bwait command, this might lead to low slot utilization. To prevent LSF from running the bwait command within a job, define LSB_BWAIT_IN_JOBS=N in the lsf.conf file.

Options

-w wait_condition
Required. Specifies the wait condition to be satisfied. This expression follows the same format as the job dependency expression for the bsub -w option. For more details, refer to bsub -w.
-t timeout
Optional. Specifies the timeout interval for the wait condition, in minutes. Specify an integer between 1 and 525600 (one year). By default, LSF uses the value of the DEFAULT_BWAIT_TIMEOUT parameter in the lsb.params file.
-r rereg_interval
Optional. Specifies the time interval to re-register the wait condition from the bwait command to the mbatch daemon, in minutes. Specify an integer between 1 and 525600 (one year). By default, LSF uses the value of the LSB_BWAIT_REREG_INTERVAL parameter in the lsf.conf file.
-h
Prints command usage to stderr and exits.
-V
Prints LSF release version to stderr and exits.