<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
My purpose with job_submit.lua script is to limit a "srun" with more
than one node and more than one CPU; in others words, "srun -N 1 -n
1". Because of this reason, in my future script I execute "if" for
comparing that values:<br>
<blockquote><tt>function slurm_job_submit(job_desc, part_list,
submit_uid)</tt><br>
<tt> local partition = "interactive"</tt><br>
<tt> if ((job_desc.script == nil or job_desc.script == '')
and job_desc.partition ~= partition) then</tt><br>
<tt> slurm.log_info("slurm_job_submit: interactive
job submitted by user_id:%d to partition:%s rejected",
job_desc.user_id, job_desc.partition)</tt><br>
<tt> return slurm.FAILURE</tt><br>
<tt> end</tt><br>
<tt> </tt><br>
<tt> local max = 1</tt><br>
<br>
<tt> <font size="+1"><b>if (job_desc.cpus_per_task >
max or job_desc.max_cpus > max or job_desc.max_nodes >
max) then</b></font></tt><br>
<tt> slurm.log_user("slurm_job_submit: parameter
error %s %s %u", job_desc.cpus_per_task, job_desc.max_cpus,
job_desc.max_nodes)</tt><br>
<tt> return slurm.FAILURE</tt><br>
<tt> end</tt><br>
<br>
<tt> return slurm.SUCCESS</tt><br>
<tt>end</tt><br>
</blockquote>
I undestand that:<br>
<ul>
<li>-N 1 --> job_desc.max_nodes=1</li>
<li>-n 1 --> job_desc.max_cpus=1</li>
</ul>
<p>Am I wrong?</p>
<p>Thanks.<br>
</p>
</body>
</html>