When a SLURM-scheduled work begins, it requires some information about its execution environment. For instance, It needs to identify the working directory and the nodes assigned to it. SLURM sends this data to the executing job through environment variables. The most common environment variables are as follows:
VARIABLE |
DESCRIPTION |
|
The Job ID. |
|
The path of the job submission directory. |
|
The hostname of the node used for job submission. |
|
Contains the definition (list) of the nodes that is assigned to the job. |
|
Number of GPUs requested. |
|
Memory per GPU. |
|
Memory per node. Same as |
|
Same as |
|
Number of tasks requested per GPU. |
|
Number of tasks requested per node. |
|
Number of tasks requested per core. |
|
Same as |
|
Total number of nodes in the job’s resource allocation. |
|
Number of tasks to be initiated on each node. |
|
Job array’s master job ID number. |
|
Job array ID (index) number. |
|
Total number of tasks in a job array. |
|
Job array’s maximum ID (index) number. |
|
Job array’s minimum ID (index) number. |
Visit the SLURM page on environment variables for a complete list of environment variables.