Environment Variables in Job Scripts for Fox
Here is a list of some useful environment variables that can be used
in job scripts. This is not a complete list. See the sbatch
documentation for more
variables. Another way to get a list of defined environment variables
is to run env in a job script and look at the output.
SLURM_JOB_ID: The jobid returned bysbatchSLURM_ARRAY_TASK_ID: The id of the current array task in an array job.SLURM_JOB_NODELIST: The list of nodes allocated to the job.SLURM_NTASKS: The number of tasks in the job. (Only set if there is more than one task.)SLURM_SUBMIT_DIR: The directory where you ransbatch. Usually the place where theslurm-<jobid>.outis located.SCRATCH: A per-job scratch directory on the node local file system. See work directory for details.OMP_NUM_THREADS: The number of threads to use for OpenMP programs. This is controlled by the--cpus-per-taskparameter tosbatch, and defaults to 1.
CC Attribution: This page is maintained by the University of Oslo IT FFU-BT group. It has either been modified from, or is a derivative of, "Environment Variables in Job Scripts" by NRIS under CC-BY-4.0. Changes: Some environment variables removed.