![](/images/new-backgrounds/1308340/308340103x1.webp)
program should pick up the SLURM_JOBID environment variable. The SLURM_JOBID has the information
The following items provide the information you need to run the preexecution program on the resource manager node, on the first allocated node, or on all the allocated nodes:
Table
To run a preexecution program on the resource manager node:
This is the default behavior. Run the
Your preexecution does not need to make use of the SLURM_JOBID environment variable.
To run a preexecution program on the first allocated node: | Use the SLURM srun | ||
| $ | /opt/hptc/bin/srun |
|
To run a preexecution program on all allocated nodes: | Use the SLURM srun directly without node options. For example: | ||
| $ | /opt/hptc/bin/srun | my_pre_exec |
NOTE Do not use the srun
See the SLURM srun(1) manpage for more information about the srun command, its options, and the SLURM_JOBID environment variable.
52 Submitting Jobs