Pre- and post-execution processing commands

Commands for submission

The bsub -E option specifies a pre-execution command. Post-execution processing can be defined at the queue and application levels.

The bsub -w option allows you to specify job dependencies that cause LSF to wait for completion of post-execution processing before starting another job.

Command

Description

bsub -E command

  • Defines the pre-execution command at the job level.

bsub -w 'post_done(job_id | "job_name")'

  • Specifies the job dependency condition required to prevent a new job from starting until post-execution processing has finished without errors.

bsub -w 'post_err(job_id | "job_name")'

  • Specifies the job dependency condition required to prevent a new job from starting until post-execution processing has exited with errors.

Commands to monitor

Command

Description

bhist -l

bhist

  • Displays the POST_DONE and POST_ERR states which can be referenced by a job submitted with bsub –w. The resource usage of post-processing is not included in the job resource usage.

  • The CPU and run times shown do not include resource usage for post-execution processing unless the parameter JOB_INCLUDE_POSTPROC is defined in lsb.applications or lsb.params.

  • Displays the job exit code and reason if the pre-exec retry limit is exceeded.

bjobs -l

  • Displays information about pending, running, and suspended jobs. During post-execution processing, the job status will be RUN if the parameter JOB_INCLUDE_POSTPROC is defined in lsb.applications or lsb.params.

  • The resource usage shown does not include resource usage for post-execution processing.

  • Displays the job exit code and reason if the pre-exec retry limit is exceeded.

bacct

  • Displays accounting statistics for finished jobs.

  • The CPU and run times shown do not include resource usage for post-execution processing, unless the parameter JOB_INCLUDE_POSTPROC is defined in lsb.applications or lsb.params.

Commands to control

Command

Description

bmod -E command

  • Changes the pre-execution command at the job level.

bmod -w 'post_done(job_id | "job_name")'

  • Specifies the job dependency condition required to prevent a new job from starting until post-execution processingt has finished without errors.

bmod -w 'post_err(job_id | "job_name")'

  • Specifies the job dependency condition required to prevent a new job from starting until post-execution processing has exited with errors.

Commands to display configuration

Command

Description

bapp -l

  • Displays information about application profiles configured in lsb.applications, including the values defined for PRE_EXEC, POST_EXEC, HOST_PRE_EXEC, HOST_POST_EXEC, JOB_INCLUDE_POSTPROC, JOB_POSTPROC_TIMEOUT, LOCAL_MAX_PREEXEC_RETRY, MAX_PREEXEC_RETRY, and REMOTE_MAX_PREEXEC_RETRY.

bparams

  • Displays the value of parameters defined in lsb.params, including the values defined for LOCAL_MAX_PREEXEC_RETRY, MAX_PREEXEC_RETRY, and REMOTE_MAX_PREEXEC_RETRY.

bqueues -l

  • Displays information about queues configured in lsb.queues, including the values defined for PRE_EXEC, POST_EXEC, HOST_PRE_EXEC, HOST_POST_EXEC, LOCAL_MAX_PREEXEC_RETRY, MAX_PREEXEC_RETRY, and REMOTE_MAX_PREEXEC_RETRY.

Use a text editor to view the lsf.sudoers configuration file.