LSF Version 7.3 - Platform LSF Configuration Reference
Environment variables
Contents
•
Environment Variables Set for Job Execution on page 585
•
Environment Variable Reference on page 586
Environment variables set for job execution
LSF transfers most environment variables between submission and execution hosts.
Environment variables related to file names and job spooling directories support paths that
contain up to 4094 characters for UNIX and Linux, or up to 255 characters for Windows.
Environment variables related to command names and job names names can contain up to
4094 characters for UNIX and Linux, or up to 255 characters for Windows.
In addition to environment variables inherited from the user environment, LSF also sets
several other environment variables for batch jobs:
•
LSB_ERRORFILE: Name of the error file specified with a bsub -e
•
LSB_JOBID: job ID assigned by LSF.
•
LSB_JOBINDEX: Index of the job that belongs to a job array.
•
LSB_CHKPNT_DIR: This variable is set each time a checkpointed job is submitted. The
value of the variable is chkpnt_dir/job_Id, a subdirectory of the checkpoint directory that
is specified when the job is submitted. The subdirectory is identified by the job ID of the
submitted job.
•
LSB_HOSTS: The list of hosts that are used to run the batch job. For sequential jobs, this
is only one host name. For parallel jobs, this includes multiple host names.
•
LSB_QUEUE: The name of the queue the job is dispatched from.
•
LSB_JOBNAME: Name of the job.
•
LSB_RESTART: Set to ‘Y’ if the job is a restarted job or if the job has been migrated.
Otherwise this variable is not defined.
•
LSB_EXIT_PRE_ABORT: Set to an integer value representing an exit status. A pre-
execution command should exit with this value if it wants the job to be aborted instead of
requeued or executed.
•
LSB_EXIT_REQUEUE: Set to the REQUEUE_EXIT_VALUES parameter of the queue.
This variable is not defined if REQUEUE_EXIT_VALUES is not configured for the queue.
•
LSB_INTERACTIVE: Set to ‘Y’ if the job is submitted with the -I option. Otherwise, it is
not defined.
•
LS_JOBPID: Set to the process ID of the job.
•
LS_SUBCWD: This is the directory on the submission when the job was submitted. This
is different from PWD only if the directory is not shared across machines or when the
execution account is different from the submission account as a result of account mapping.
Environment variable reference
BSUB_BLOCK
BSUB_QUIET BSUB_QUIET2
BSUB_STDERR CLEARCASE_DRIVE CLEARCASE_MOUNTDIR
CLEARCASE_ROOT ELIM_ABORT_VALUE LM_LICENSE_FILE
Environment variables
Platform LSF Configuration Reference 555