[slurm-users] How to access environment variables in submit script?
dchebota at gmu.edu
Thu May 10 07:19:10 MDT 2018
Is it possible to access environment variables in a submit script?
F.e. $SCRATCH is set to a path and I like to use $SCRATCH variable in #SBATCH:
Since it's Bash script, # are ignored and I suspect these variables need to be defined on Slurm controller (?).
As a workaround I can run 'sbatch --output=$SCRATCH/slurm/%j.out --error=$SCRATCH/slurm/%j.err <myscript>' and it works. But is there any way to use non-slurm env variables via #SBATCH?
More information about the slurm-users