Hi

I think that, if specified, the 'sbatch -N' number comes through as min_nodes 
(& max_nodes if relevant) in the job descriptor.

~~
Ade



From: slurm-users <slurm-users-boun...@lists.schedmd.com> On Behalf Of 
weijianwen
Sent: 03 November 2018 12:53
To: slurm-users@lists.schedmd.com
Subject: [slurm-users] How to get num_nodes in job_submit.lua

Hi,

                We're using SLURM 17.11 and trying to control job submission 
from user via Lua plugins job_submit.lua. Number of nodes specified via "-N" 
option in SLURM job script is crucial for us, but I found no where to get it. 
According to job_descriptor defined in 
https://github.com/SchedMD/slurm/blob/slurm-17.11/slurm/slurm.h.in , in 
contrast to num_tasks, 'num_nodes' is not a member of job_descriptor structure. 
I tried job_desc.num_nodes in job_submit.lua, then it turns out be nil.

                I wonder is 'num_nodes' the correct name to get the requested 
number of nodes. And is any way to get number of nodes in job_submit.lua?

Thank you!

Jianwen
________________________________

   [HPC Wales - www.hpcwales.co.uk] <http://www.hpcwales.co.uk>

________________________________

The contents of this email and any files transmitted with it are confidential 
and intended solely for the named addressee only.  Unless you are the named 
addressee (or authorised to receive this on their behalf) you may not copy it 
or use it, or disclose it to anyone else.  If you have received this email in 
error, please notify the sender by email or telephone.  All emails sent by High 
Performance Computing Wales have been checked using an Anti-Virus system.  We 
would advise you to run your own virus check before opening any attachments 
received as we will not in any event accept any liability whatsoever, once an 
email and/or attachment is received.

High Performance Computing Wales is a private limited company incorporated in 
Wales on 8 March 2010 as company number 07181701.

Our registered office is at Finance Office, Bangor University, Cae Derwen, 
College Road, Bangor, Gwynedd. LL57 2DG. UK.

High Performance Computing Wales is part funded by the European Regional 
Development Fund through the Welsh Government.

Reply via email to