Job array (or array jobs)
A job array is a collection of similiar independent jobs (called the job array “tasks”) which are identified by sequential integers (or indices), the job array task IDs.
The entire job array (containing multiple tasks) has one job ID
Each task has a task ID
The key difference between a job array and regular (non-job array) job is the -t
parameter, which specifies the range of the job task indices.
Contiguous indices, e.g.
#$ -t 1-100
will generate indices from 1 to 100.
With step size, e.g.
#$ -t 1-100:10
will generate indices 1, 11, 21, …, 91.
Each job array task can has its own input and output files, typically indexed by the task IDs. For example, task 1 reads from input 1 and produces output 1. Task 2 reads from input 2 and produces output 2. And so on.
Note
0 is not a valid task ID, i.e. the starting index must be 1 or greater.