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:
Was this topic helpful?
23 June 2018