Job arrays: Difference between revisions

Jump to navigation Jump to search
copyedit
No edit summary
(copyedit)
Line 9: Line 9:
If your work consists of a large number of tasks which differ only in some parameter, you can conveniently submit many tasks at once using a <i>job array,</i> also known as a <i>task array</i> or an <i>array job</i>. The individual tasks in the array are distinguished by an environment variable, <code>$SLURM_ARRAY_TASK_ID</code>, which Slurm sets to a different value for each task. You set the range of values with the <code>--array</code> parameter.
If your work consists of a large number of tasks which differ only in some parameter, you can conveniently submit many tasks at once using a <i>job array,</i> also known as a <i>task array</i> or an <i>array job</i>. The individual tasks in the array are distinguished by an environment variable, <code>$SLURM_ARRAY_TASK_ID</code>, which Slurm sets to a different value for each task. You set the range of values with the <code>--array</code> parameter.


See [https://slurm.schedmd.com/job_array.html Job Array Support] at SchedMD.com for detailed documentation.
See [https://slurm.schedmd.com/job_array.html Job Array Support] for more details.
   
   
== Examples of the --array parameter == <!--T:3-->
== Examples of the --array parameter == <!--T:3-->
Line 37: Line 37:


<!--T:8-->
<!--T:8-->
The script references $SLURM_ARRAY_TASK_ID to select an input file, for example ("program_x"), or to set a command-line argument for the application ("program_y").
The script references <code>$SLURM_ARRAY_TASK_ID</code> to select an input file, for example ("program_x"), or to set a command-line argument for the application ("program_y").


<!--T:9-->
<!--T:9-->
cc_staff
82

edits

Navigation menu