[slurm-users] Slurm Environment Variable for Memory

Chris Samuel chris at csamuel.org
Tue Aug 21 02:17:59 MDT 2018


On Monday, 20 August 2018 9:21:39 PM AEST Juan A. Cordero Varelaq wrote:

> I am just running an interactive job with "srun -I --pty /bin/bash" and
> then run "echo $SLURM_MEM_PER_NODE", but it shows nothing. Does it have
> to be defined in any conf file?

My apologies - I've just tested here (with Slurm 17.11.7) and you are indeed 
correct, they only appear when launched with sbatch and salloc and not when 
you launch jobs directly with srun!

Also you only ever get ${SLURM_MEM_PER_CPU} *or* ${SLURM_MEM_PER_NODE} but not 
both together, so you'll need to check for both.

Hope this helps!

All the best,
Chris
-- 
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC






More information about the slurm-users mailing list