Pre- and post-execution processing commands

Commands for submission

The bsub -E option specifies a pre-execution command. Post-execution commands cannot be specified using bsub; post-execution processing can only 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 on a host until post-execution processing on that host 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 on a host until post-execution processing on that host has exited with errors.


Commands to monitor


Command

Description

bhist

bhist -l

  • Displays the host status of all hosts, specific hosts, or specific host groups, including the POST_DONE and POST_ERR states, if the user submitted the job with the -w option of bsub.

  • 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 on a host until post-execution processing on that host 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 on a host until post-execution processing on that host 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, 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 and 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.