according to the docs, "srun" should terminate with exit code $SLURM_EXIT_IMMEDIATE if an "srun --immediate" job cannot start immediately. however, this does not work for me. in my observations, it will typically terminate with exit code 1 instead (or with $SLURM_EXIT_ERROR if that variable is set). i could reproduce such behaviour with two different Slurm 17.11 installations. steps to reproduce: $ export SLURM_EXIT_IMMEDIATE=120; srun -N 150 -I /bin/true; echo $? srun: error: Unable to allocate resources: Required node not available (down, drained or reserved) 1 $ export SLURM_EXIT_ERROR=120; srun -N 150 -I /bin/true; echo $? srun: error: Unable to allocate resources: Required node not available (down, drained or reserved) 120 - christian