Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Column

Table 3. Common environment variables in PBS Pro and Slurm

Environment Variable PBS Pro Slurm
Job ID PBS_JOBIDSLURM_JOB_ID
Submit directory PBS_O_WORKDIRSLURM_SUBMIT_DIR*†
Submit host PBS_O_HOSTSLURM_SUBMIT_HOST
Node list PBS_NODEFILESLURM_JOB_NODELIST
Job Array Index PBS_ARRAY_INDEXSLURM_ARRAY_TASK_ID


Note
iconfalse
titleFootnotes

* PBS_O_WORKDIR and SLURM_SUBMIT_DIR both contain the name of the working directory from which the user submitted the job.
When using Slurm it is not necessary to explicitly change to this directory, as this is done by default.

† When the --export=NONE option is used (as recommended) it is not defined.

 PBS_NODEFILE points to a file containing the nodes allocated to the job. SLURM_JOB_NODELIST contains a regular expression listing the nodes. For example:

SLURM_JOB_NODELIST=nid000[32-39]

To expand the nodes explicitly, use the following command:

scontrol show hostnames $SLURM_JOB_NODELIST


...