[slurm-users] job_submit.lua and memory allocations

William G. Wichser bill at Princeton.EDU
Fri Jan 24 13:52:37 UTC 2020


Resurrecting an older thread where I need to obtain the value for memory 
in a submitted job.  Turns out this is not an easy case with the method 
I'm trying to use so hope that there is just some variable I am overlooking.

The trivial case was simply to look at job_desc.pn_min_memory.  And this 
works fine as long as jobs are submitted with a --mem= flag.  But there 
are two other ways that jobs get submitted which make this value 
something like 2^63.

The first is when no memory is specified and users rely on the default. 
The second is with --mem-per-cpu=X


For that second case I can detect using
(job_desc.pn_min_memory - slurm.MEM_PER_CPU) * job_desc.min_cpus

But I find that when users are using the default memory allocation, it 
isn't so easy to detect since it appears that both of the memory values 
are set to 2^63 or close to that number.  Maybe it's 2^64 -1.  Whatever.

I just feel that there has to be a better way!  Is there soemthing that 
I'm missing?  Perhaps a tres.memory or something which has the right 
value when in job_submit.lua?

Thanks,
Bill


More information about the slurm-users mailing list