Platform LSF Reference Version 6.2

Environment Variables Set for Job Execution
Platform LSF Reference
268
Environment Variables Set for Job Execution
LSF transfers most environment variables between submission and execution hosts. 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: Batch 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_JOB_STARTER: Set to the value of the job starter if a job starter is defined
for the queue.
LSB_INTERACTIVE: Set to ‘Y’ if the job is submitted with the -I option.
Otherwise, it is undefined.
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.