Job notification

By default, when a batch job completes or exits, LSF sends a job report by email to the submitting user account.

The job email report includes the following information:
  • Standard output (stdout) of the job
  • Standard error (stderr) of the job
  • LSF job information such as CPU, process, and memory usage

The output from stdout and stderr are merged together in the order printed, as if the job was run interactively. The default standard input (stdin) file is the null device. The null device on UNIX is /dev/null.

Enable the LSB_POSTEXEC_SEND_MAIL parameter in the lsf.conf file to have LSF send a second email to the user that provides details of the post execution, if any. This includes any applicable output.

bsub notification options

-B
Sends email to the job submitter when the job is dispatched and begins running. The default destination for email is defined by the LSB_MAILTO parameter in the lsf.conf file.
-u user_name
If you want mail sent to another user, use the -u user_name option to the bsub command. Mail associated with the job will be sent to the named user instead of to the submitting user account.
-notify
If you want to be notified when the job reaches any of the specified states (exit, done, start, or suspend), use the -notify option. Use a space to separate multiple job states.
Note: Use this option with other integrations to handle notifications.
-N
If you want to separate the job report information from the job output, use the -N option to specify that the job report information should be sent by email.
-Ne
If you want the separate job report information to be sent only on a job error, use the -Ne option to specify that the job report information should be sent by email when the job exits.

Users can set the environment variable LSB_JOB_REPORT_MAIL=N at job submission to disable email notification. Users can also set the environment variable LSB_JOB_REPORT_MAIL=ERROR at job submission to ensure that job report information is sent only on a job error (same as the -Ne option).

Output and error file options (-o output_file, -e error_file, -oo output_file, and -eo error_file)

The output file created by the -o and -oo options to the bsub command normally contains job report information as well as the job output. This information includes the submitting user and host, the execution host, the CPU time (user plus system time) used by the job, and the exit status.

If you specify a -o output_file or -oo output_file option and do not specify a -e error_file or -eo error_file option, the standard output and standard error are merged and stored in output_file. You can also specify the standard input file if the job needs to read input from stdin.

Note:

The file path can contain up to 4094 characters for UNIX and Linux, or up to 255 characters for Windows, including the directory, file name, and expanded values for %J (job_ID) and %I (index_ID).

The output files specified by the output and error file options are created on the execution host.