You can also use the newer squeue -O option to look at TRES for the job.
Here's an example of a job that requested one node and two CPUs, with
--mem-per-cpu=1750M:

# squeue --noheader -O tres -j 109296_1

cpu=2,mem=3500,node=


On Wed, Apr 13, 2016 at 6:34 PM, Lyn Gerner <[email protected]>
wrote:

> Hi Felix,
>
> Memory is one of the job parameters that is not available automatically in
> an environment variable. You could have your user run the following command
> inside the job script (which takes advantage of the extreme configurability
> of squeue output formatting), but they will need to understand whether
> they've requested memory per node or per CPU. In this example, I submitted
> a single-core job w/memory per node of 2G (--mem=2G):
>
> # HeapMem=$(squeue --noheader -j $SLURM_JOB_ID --format=%m)
>
> # echo $HeapMem
>
> 2G
>
>
> Regards,
>
> Lyn
>
> On Mon, Apr 11, 2016 at 5:13 AM, Felip Moll <[email protected]> wrote:
>
>> I have a user that needs to gather some submission parameters of his job
>> after it's submitted, for example using an environment variable like it is
>> done in other cases like: SLURM_TASKS_PER_NODE, SLURM_JOB_NODELIST, etc.
>>
>> Specifically, I need to get the total memory of the job.
>>
>> What do you suggest me to do to set the environment with this info?
>>
>> He need this information to configure on run-time the heap, etc.
>>
>> Regards,
>> Felip M
>>
>>
>> *--Felip Moll Marquès*
>> Computer Science Engineer
>> E-Mail - [email protected]
>> WebPage - http://lipix.ciutadella.es
>>
>
>

Reply via email to