Platform LSF Reference Version 6.2
Environment Variables
Platform LSF Reference
279
LSB_JOBINDEX
Syntax
LSB_JOBINDEX=index
Description
Contains the job array index.
Valid values
Any integer greater than zero but less than the maximum job array size.
Notes
LSB_JOBINDEX is set when each job array element is dispatched. Its value
corresponds to the job array index. LSB_JOBINDEX is set for all jobs. For non-array
jobs, LSB_JOBINDEX is set to zero (0).
Where defined Set during job execution based on bsub options.
Example
You can use LSB_JOBINDEX in a shell script to select the job command to be
performed based on the job array index.
For example:
if [$LSB_JOBINDEX -eq 1]; then
cmd1
fi
if [$LSB_JOBINDEX -eq 2]; then
cmd2
fi
See also
LSB_JOBINDEX_STEP, LSB_REMOTEINDEX
LSB_JOBINDEX_STEP
Syntax
LSB_JOBINDEX_STEP=step
Description
Step at which single elements of the job array are defined.
Valid values
Any integer greater than zero but less than the maximum job array size
Default
1
Notes
LSB_JOBINDEX_STEP is set when a job array is dispatched. Its value corresponds to
the step of the job array index. This variable is set only for job arrays.
Where defined
Set during job execution based on bsub options.
Example
The following is an example of an array where a step of 2 is used:
array[1-10:2]
elements:1 3 5 7 9
If this job array is dispatched, then LSB_JOBINDEX_STEP=2
See also
LSB_JOBINDEX
LSB_JOBNAME
Syntax
LSB_JOBNAME=job_name
Description
The name of the job defined by the user at submission time.
Default
The job’s command line