Platform LSF Administration Guide Version 6.2

Chapter 33
External Job Submission and Execution Controls
Administering Platform LSF
495
Using esub
About esub
An esub, short for external submission, is a user-written executable (binary or script)
that can be used to validate, modify, or reject jobs. The
esub is put into
LSF_SERVERDIR (defined in
lsf.conf) where LSF checks for its existence when a
job is submitted, restarted, and modified. If LSF finds an
esub, it is run by LSF.
Whether the job is submitted, modified, or rejected depends on the logic built into the
esub.
Any messages that need to be provided to the user should be directed to the standard
error (
stderr) stream and not the standard output (stdout) stream.
In this section
Environment variables to bridge esub and LSF” on page 495
General esub logic” on page 498
Rejecting jobs” on page 498
Validating job submission parameters” on page 498
Modifying job submission parameters” on page 499
Using bmod and brestart commands with mesub” on page 500
Using multiple esub (mesub)” on page 500
How master esub invokes application-specific esubs” on page 500
Configuring master esub and your application-specific esub” on page 501
Environment variables to bridge esub and LSF
LSF provides the following environment variables in the esub execution environment:
LSB_SUB_PARM_FILE
This variable points to a temporary file containing the job parameters that esub reads
when the job is submitted. The submission parameters are a set of name-value pairs on
separate lines in the format
"option_name=value". The following option names are
supported:
Option Description
LSB_SUB_ADDITIONAL String format parameter containing the value of the -a option to
bsub
The value of -a is passed to esub, but it does not directly affect the
other bsub parameters or behavior. The value of -a must
correspond to an actual esub file. For example, to use
bsub -a fluent, the file esub.fluent must exist in
LSF_SERVERDIR.
LSB_SUB_ADDITIONAL cannot be changed in or added to
LSB_SUB_MODIFY_FILE.
LSB_SUB_BEGIN_TIME Begin time, in seconds since 00:00:00 GMT, Jan. 1, 1970
LSB_SUB_CHKPNT_DIR Checkpoint directory
LSB_SUB_COMMAND_LINE
bsub job command argument
LSB_SUB_COMMANDNAME must be set in
lsf.conf to enable
esub to use this variable
LSB_SUB_CHKPNT_PERIOD Checkpoint period