Platform LSF Administration Guide Version 6.2
Creating a Job Array
Administering Platform LSF
416
Creating a Job Array
A job array is created at job submission time using the -J option of bsub. For example,
the following command creates a job array named
myArray made up of 1000 jobs.
%
bsub -J "myArray[1-1000]" myJob
Job <123> is submitted to default queue <normal>.
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. Commas (,) are used to separate multiple
indexList entries. The maximum
length of this specification is 255 characters.
arrayName
User specified string 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
Used with end to specify 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]