Job arrays - Slurm¶
Job arrays in Slurm lets you run many jobs with the same job script. If you have many data files that you would normally have processed in multiple jobs, job arrays could be an alternative way to instead generate many job scripts for each run and submit it one by one.
Example
Job arrays are only supported for batch jobs and the array index values are specified using the --array
or -a
option of the sbatch
command. The option argument can be specific array index values, a range of index values, and an optional step size (see next examples).
Note
The minimum index value is zero and the maximum value is a Slurm configuration parameter (MaxArraySize
minus one). Jobs which are part of a job array will have the environment variable SLURM_ARRAY_TASK_ID
set to its array index value.
Example