25.06.2015 Views

Administering Platform LSF - SAS

Administering Platform LSF - SAS

Administering Platform LSF - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 39<br />

Job Email, and Job File Spooling<br />

Example<br />

The following example submits myjob to the night queue:<br />

% bsub -q night -i job_in -o job_out -e job_err myjob<br />

The job reads its input from file job_in. Standard output is stored in file<br />

job_out, and standard error is stored in file job_err.<br />

Size of job email<br />

LSB_MAILSIZE<br />

environment<br />

variable<br />

LSB_MAILSIZE<br />

values<br />

Some batch jobs can create large amounts of output. To prevent large job<br />

output files from interfering with your mail system, you can use the<br />

LSB_MAILSIZE_LIMIT parameter in lsf.conf to limit the size of the email<br />

containing the job output information.<br />

By default, LSB_MAILSIZE_LIMIT is not enabled—no limit is set on size of<br />

batch job output email.<br />

If the size of the job output email exceeds LSB_MAILSIZE_LIMIT, the output is<br />

saved to a file under JOB_SPOOL_DIR, or the default job output directory if<br />

JOB_SPOOL_DIR is undefined. The email informs users where the job output<br />

is located.<br />

If the -o option of bsub is used, the size of the job output is not checked<br />

against LSB_MAILSIZE_LIMIT.<br />

<strong>LSF</strong> sets LSB_MAILSIZE to the approximate size in KB of the email containing<br />

job output information, allowing a custom mail program to intercept output<br />

that is larger than desired. If you use the LSB_MAILPROG parameter to specify<br />

the custom mail program that can make use of the LSB_MAILSIZE environment<br />

variable, it is not necessary to configure LSB_MAILSIZE_LIMIT.<br />

LSB_MAILSIZE is not recognized by the <strong>LSF</strong> default mail program. To prevent<br />

large job output files from interfering with your mail system, use<br />

LSB_MAILSIZE_LIMIT to explicitly set the maximum size in KB of the email<br />

containing the job information.<br />

The LSB_MAILSIZE environment variable can take the following values:<br />

◆ A positive integer<br />

If the output is being sent by email, LSB_MAILSIZE is set to the estimated<br />

mail size in KB.<br />

◆ -1<br />

If the output fails or cannot be read, LSB_MAILSIZE is set to -1 and the<br />

output is sent by email using LSB_MAILPROG if specified in lsf.conf.<br />

◆ Undefined<br />

If you use the -o or -e options of bsub, the output is redirected to an<br />

output file. Because the output is not sent by email in this case,<br />

LSB_MAILSIZE is not used and LSB_MAILPROG is not called.<br />

If the -N option is used with the -o option of bsub, LSB_MAILSIZE is not<br />

set.<br />

<strong>Administering</strong> <strong>Platform</strong> <strong>LSF</strong> 507

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!