<div dir="auto">Thanks a lot. I will try this.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 17 Aug 2021, 19:10 Paul Raines, <<a href="mailto:raines@nmr.mgh.harvard.edu">raines@nmr.mgh.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I do this via code in job_submit.lua<br>
<br>
function slurm_job_submit(job_desc, part_list, submit_uid)<br>
-- Must allocate GPU if on a GPU partition<br>
if (job_desc.tres_per_job == nil and job_desc.tres_per_node == nil) then<br>
if (string.find(job_desc.partition, "rtx8000")) then<br>
slurm.log_info("slurm_job_submit: for user %u, no GPU requested in rtx8000",<br>
job_desc.user_id)<br>
slurm.log_user("FATAL: you must request at least one GPU in the rtx8000 partition");<br>
return slurm.ERROR<br>
end<br>
end<br>
return slurm.SUCCESS<br>
end<br>
<br>
<br>
Then set JobSubmitPlugins=lua in slurm.conf<br>
<br>
I cannot find any documentation about what really should be in <br>
tres_per_job and tres_per_node as I would expect the cpu and memory<br>
requests in there but it is still "nil" even when those are given.<br>
For our cluster I have only seen it non-nil when GPUs are requested.<br>
<br>
<br>
<br>
-- Paul Raines (<a href="http://help.nmr.mgh.harvard.edu" rel="noreferrer noreferrer" target="_blank">http://help.nmr.mgh.harvard.edu</a>)<br>
<br>
<br>
<br>
On Tue, 17 Aug 2021 6:20am, pravin wrote:<br>
<br>
> Dear all,<br>
><br>
> I am trying to restrict users not to use nodes without GPU but no luck.<br>
> Please help me with this.<br>
> Some users are accessing the GPU nodes and submitting the job(without GPU<br>
> ), so I want to restrict such users not use nodes without GPU.<br>
><br>
> Thanks<br>
> Pravin<br>
><br>
</blockquote></div>