Explain how SLURM variables work
AdrienLeGuillou opened this issue · comments
by default workflow steps use --export=NONE
this can be overridden in the sbatch_opts
.
with --export=NONE
, all SLURM_*
vars are still passed.
note:
# in sh
export ABC=10
export SLURM_ABC=20
# in sbatch
#SBATCH --export=NONE
echo $ABC # gives ""
echo $SLURM_ABC # gives 20
# in sbatch
#SBATCH --export=ALL
echo $ABC # gives 10
echo $SLURM_ABC # gives 20
# in sbatch
#SBATCH --export=ABC=30,SLURM_ABC=40
echo $ABC # gives 30
echo $SLURM_ABC # gives 20
takeaway: SLURM_*
cannot be overridden by --export
, must actually be exported in the user ENV