Difference between revisions of "SLURM Environmental Variables"
Jump to navigation
Jump to search
(Created page with "Slurm passes configuration data to jobs via environmental variables. The following is a list of commonly used variables that are set by Slurm for each job {| class="wikitable...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Scheduler]] | ||
Slurm passes configuration data to jobs via environmental variables. The following is a list of commonly used variables that are set by Slurm for each job | Slurm passes configuration data to jobs via environmental variables. The following is a list of commonly used variables that are set by Slurm for each job | ||
Line 29: | Line 30: | ||
|- | |- | ||
| $SLURM_SUBMIT_DIR || Submit Directory | | $SLURM_SUBMIT_DIR || Submit Directory | ||
+ | |- | ||
+ | | $SLURM_TMPDIR || Temporary directory. See also [[Temporary Directories]]. | ||
|- | |- | ||
| $SLURM_SUBMIT_HOST || Host submitted from | | $SLURM_SUBMIT_HOST || Host submitted from |
Latest revision as of 19:02, 8 August 2024
Slurm passes configuration data to jobs via environmental variables. The following is a list of commonly used variables that are set by Slurm for each job
Slurm Variable Name | Description |
---|---|
$SLURM_CPUS_ON_NODE | Number of cores/node |
$SLURM_CPUS_PER_TASK | Number of cores per task. I.e., the value given to the -cpus-per-task or -c sbatch options. Not set unless one of those options given. |
$SLURM_JOB_ID | Job ID |
$SLURM_JOBID | Deprecated. Same as SLURM_JOB_ID |
$SLURM_JOB_NAME | Job Name |
$SLURM_JOB_NODELIST | Nodes assigned to job |
$SLURM_JOB_NUM_NODES | Number of nodes allocated to job |
$SLURM_LOCALID | Index to core running on within node |
$SLURM_NODEID | Index to node running on relative to nodes assigned to job |
$SLURM_NTASKS | Total number of cores for job |
$SLURM_PROCID | Index of task relative to job |
$SLURM_SUBMIT_DIR | Submit Directory |
$SLURM_TMPDIR | Temporary directory. See also Temporary Directories. |
$SLURM_SUBMIT_HOST | Host submitted from |
$SLURM_TASKS_PER_NODE | This gives a comma-delimited list of integers representing the task per the node, using the same ordering as in SLURM_JOB_NODELIST. If consecutive nodes have the same task count, the integer will be followed by '(xN)', so the example value is for 2 tasks on the first three nodes and 1 task on the fourth node. |