25.06.2015 Views

Administering Platform LSF - SAS

Administering Platform LSF - SAS

Administering Platform LSF - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 30<br />

External Job Submission and Execution Controls<br />

Using esub<br />

About esub<br />

An esub, short for external submission, is a user-written executable (binary<br />

or script) that can be used to validate, modify, or reject jobs. The esub is put<br />

into <strong>LSF</strong>_SERVERDIR (defined in lsf.conf) where <strong>LSF</strong> checks for its existence<br />

when a job is submitted, restarted, and modified. If <strong>LSF</strong> finds an esub, it is run<br />

by <strong>LSF</strong>. Whether the job is submitted, modified, or rejected depends on the<br />

logic built into the esub.<br />

Any messages that need to be provided to the user should be directed to the<br />

standard error (stderr) stream and not the standard output (stdout) stream.<br />

In this section ◆ “Environment variables to bridge esub and <strong>LSF</strong>” on page 381<br />

◆ “General esub logic” on page 384<br />

◆ “Rejecting jobs” on page 384<br />

◆ “Validating job submission parameters” on page 384<br />

◆ “Modifying job submission parameters” on page 385<br />

◆ “The bmod and brestart commands and esub” on page 386<br />

◆ “How <strong>LSF</strong> supports multiple esub” on page 386<br />

◆ “How master esub invokes application-specific esubs” on page 386<br />

◆ “Configuring master esub and your application-specific esub” on page 387<br />

Environment variables to bridge esub and <strong>LSF</strong><br />

LSB_SUB_PARM_FILE<br />

<strong>LSF</strong> provides the following environment variables in the esub execution<br />

environment:<br />

This variable points to a temporary file containing the job parameters that esub<br />

reads when the job is submitted. The submission parameters are a set of namevalue<br />

pairs on separate lines in the format "option_name=value". The<br />

following option names are supported:<br />

Option<br />

Description<br />

LSB_SUB_ADDITIONAL Arbitrary string format parameter containing the value of the -a<br />

option to bsub<br />

The value of -a is passed to esub, but it does not directly<br />

affect the other bsub parameters or behavior.<br />

LSB_SUB_ADDITIONAL cannot be changed in or added to<br />

LSB_SUB_MODIFY_FILE..<br />

LSB_SUB_BEGIN_TIME Begin time, in seconds since 00:00:00 GMT, Jan. 1, 1970<br />

LSB_SUB_CHKPNT_DIR<br />

Checkpoint directory<br />

LSB_SUB_CLUSTER<br />

Submission cluster name (MultiCluster only)<br />

LSB_SUB_COMMAND_LINE<br />

Job command<br />

LSB_SUB_CHKPNT_PERIOD<br />

Checkpoint period<br />

LSB_SUB_DEPEND_COND<br />

Dependency condition<br />

LSB_SUB_ERR_FILE<br />

Standard error file name<br />

<strong>Administering</strong> <strong>Platform</strong> <strong>LSF</strong> 381

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

Saved successfully!

Ooh no, something went wrong!