Job Arrays
SLURM job arrays are a mechanism through which you can run many different copies of the same job in parallel, with each copy of the job being assigned a unique numerical ID. They contain custom environment variables that can be used to determine how the job executes through flow control mechanisms, such as conditional (if/then) statements. Job arrays can be useful for tasks that are embarassingly parallel, in which many instances of the same program runs on different files and these instances require no communication. More resources for how to set up and use job arrays can be found below:
- Official SLURM Documentation
- /wiki/spaces/rcs/pages/62138713
- Stanford's excellent guide to scripting for arrays, which covers the logic for cycling through a number of files to process