Job Arrays

Job arrays are groups of jobs with the same executable and resource requirements, but different input files. Job arrays can be submitted, controlled, and monitored as a single unit or as individual jobs or groups of jobs.

Each job submitted from a job array shares the same job ID as the job array and are uniquely referenced using an array index. The dimension and structure of a job array is defined when the job array is created.

Syntax

The bsub syntax used to create a job array follows:
bsub -J "arrayName[indexList, ...]" myJob
Where:
-J "arrayName[indexList, ...]"
Names and creates the job array. The square brackets, [ ], around indexList must be entered exactly as shown and the job array name specification must be enclosed in quotes. Use commas (,) to separate multiple indexList entries. The maximum length of this specification is 255 characters.
arrayName
User specified string that is used to identify the job array. Valid values are any combination of the following characters:
a-z | A-Z | 0-9 | . | - | _
indexList = start[-end[:step]]
Specifies the size and dimension of the job array, where:
start
Specifies the start of a range of indices. Can also be used to specify an individual index. Valid values are unique positive integers. For example, [1-5] and [1, 2, 3, 4, 5] specify 5 jobs with indices 1 through 5.
end
Specifies the end of a range of indices. Valid values are unique positive integers.
step
Specifies the value to increment the indices in a range. Indices begin at start, increment by the value of step, and do not increment past the value of end. The default value is 1. Valid values are positive integers. For example, [1-10:2] specifies a range of 1-10 with step value 2 creating indices 1, 3, 5, 7, and 9.
After the job array is created (submitted), individual jobs are referenced using the job array name or job ID and an index value. For example, both of the following series of job array statements refer to jobs submitted from a job array named myArray which is made up of 1000 jobs and has a job ID of 123:
myArray[1], myArray[2], myArray[3], ..., myArray[1000] 
123[1], 123[2], 123[3], ..., 123[1000]