...
If you need to submit a large number of similar jobs, please do use for loops to submet them, but instead use job arrays (this lessens the burden on the scheduler). Arrays can be defined using the -a <number of jobs>
option. To divide your workload on to the different jobs within your jobscript, there are several environment variables that can be used:
Erweitern |
---|
Kein Format |
---|
| SLURM_ARRAY_TASK_COUNT
Total number of tasks in a | job array.
SLURM_ARRAY_TASK_ID
Job array ID (index) number.
SLURM_ARRAY_TASK_MAX
Job array's maximum ID (index) number.
SLURM_ARRAY_TASK_MIN
Job array's minimum ID (index) number.
SLURM_ARRAY_TASK_STEP
Job array's index step size.
SLURM_ARRAY_JOB_ID
Job array's master job ID number. |
|
Codeblock |
---|
#!/bin/bash
#SBATCH -p standard96
#SBATCH -t 12:00:00 #one day
#SBATCH -N 16
#SBATCH --tasks-per-node 96
#SBATCH -a 0-3
#SBATCH -o arrayjob-%A_%a #"%A" is replaced by the job ID and "%a" with the array index.
[...]
|
...