Job Report Emails and Text Output Files on the Scientific Computing Linux Clusters

Introduction

Jobs running through the LSF scheduler on the Linux Cluster generate three types of output in addition to any output files that your application may create

  1. Job Report: breakdown of start and end-time, CPU time and memory used and error code if there is one
  2. Standard output: any text that the job script would print to the terminal screen if it were running interactively
  3. Standard error: error messages generated by job script

The cluster scheduler can either email this or save it to a file, if neither option is specified two emails per job (or per element in a job array) will be sent to the email address you provided when registering for a cluster account. 

LSF options setting the destination of job text output

If you do not wish to receive email for each job, set both "BSUB -o" and "BSUB -e"

#BSUB -o

Instructs LSF to save the Job Report and Standard output to a file.  Use "%J" in place of the Job ID number (and "%I" in place of the Job Index number for Job arrays) to prevent jobs overwriting the output from earlier runs

#BSUB -o "%J.out"

or, for Job Arrays:

#BSUB -o "%J.%I.out"

#BSUB -e

#BSUB -e "%J.err"

or, for Job Arrays:

#BSUB -e "%J.%I.err"

#BSUB -N

Send the Job Report via email (useful to receive a job summary email in addition to saving terminal output to disk)

#BSUB -u 

Provide an alternate email address

#BSUB -u you@partners.org

Discarding all job text output

In LSF job scripts

To suppress job emails, set the destination email address to "nobody".  The job terminal output will be written to a hidden ".lsbatch" folder in your home folder, and discarded when the job is complete. Use this LSF option in the job script:

#BSUB -u nobody

Where job output very large amounts of text to the terminal, this can fill up your home directory.  We recommend adjusting the application options to reduce the verbosity of output, however discarding all job text output is possible.   To discard all job text output immediately, and suppress emails set both "-o" and "-e" as follows and do not set "-N":

#BSUB -o /dev/null
#BSUB -e /dev/null

In this case, errors generated by the jobs will not be saved.

For a single job

Enter this line in the terminal before submitting an LSF jobs.  All subsequent jobs will not send mail

export LSB_JOB_REPORT_MAIL=N

Globally

Add this line to your "${HOME}/.bashrc" file

export LSB_JOB_REPORT_MAIL=N

 

 

 

Go to KB0027928 in the IS Service Desk

Related articles