Troubleshooting
Problem
Accessing LSF batch job ID and array ID within job environment
Resolving The Problem
How can I determine an LSF batch job's Job ID or Array ID within that job's execution environment?
LSF makes the following job ID or array ID related environment variables available to LSF jobs:LSB_JOBID:
LSF assigned job ID
LSB_BATCH_JID
: Array job ID. Includes job ID and array index number
LSB_JOBINDEX
: Job array index
For example, a 4-element array job is submitted as follows:$ bsub -J "job[1-4]" my_job
Job <13234> is submitted to default queue
The third element job from this array will have access to the following environment variables and corresponding values:
LSB_JOBID=13234
LSB_BATCH_JID=13234[3]
LSB_JOBINDEX=3
Was this topic helpful?
Document Information
Modified date:
23 June 2018
UID
isg3T1015989