Slurm: Batch Job Variables
The following environment variables of Slurm are added to your environment once your job has started (only an excerpt of the most important ones).
Environment | Brief explanation |
---|---|
SLURM_JOB_CPUS_PER_NODE | Number of processes per node dedicated to the job |
SLURM_JOB_NODELIST | List of nodes dedicated to the job |
SLURM_JOB_NUM_NODES | Number of nodes dedicated to the job |
SLURM_MEM_PER_NODE | Memory per node dedicated to the job |
SLURM_NPROCS | Total number of processes dedicated to the job |
SLURM_CLUSTER_NAME | Name of the cluster executing the job |
SLURM_CPUS_PER_TASK | Number of CPUs requested per task |
SLURM_JOB_ACCOUNT | Account name |
SLURM_JOB_ID | Job ID |
SLURM_JOB_NAME | Job Name |
SLURM_JOB_PARTITION | Partition/queue running the job |
SLURM_JOB_UID | User ID of the job's owner |
SLURM_SUBMIT_DIR | Job submit folder (the directory from which sbatch was invoked) |
SLURM_JOB_USER | User name of the job's owner |
SLURM_RESTART_COUNT | Number of times job has restarted |
SLURM_PROCID | Task ID (MPI rank) |
SLURM_NTASKS | The total number of tasks available for the job |
SLURM_STEP_ID | Job step ID |
SLURM_STEP_NUM_TASKS | Task count (number of PI ranks) |
SLURM_JOB_CONSTRAINT | Job constraints |
See also Slurm input and output environment variables
Last update: February 25, 2021