I do this via code in job_submit.lua
function slurm_job_submit(job_desc, part_list, submit_uid)
-- Must allocate GPU if on a GPU partition
if (job_desc.tres_per_job == nil and job_desc.tres_per_node == nil) then
if (string.find(job_desc.partition, "rtx8000")) then
slurm.log_info("slurm_job_submit: for user %u, no GPU requested in
rtx8000",
job_desc.user_id)
slurm.log_user("FATAL: you must request at least one GPU in the rtx8000
partition");
return slurm.ERROR
end
end
return slurm.SUCCESS
end
Then set JobSubmitPlugins=lua in slurm.conf
I cannot find any documentation about what really should be in
tres_per_job and tres_per_node as I would expect the cpu and memory
requests in there but it is still "nil" even when those are given.
For our cluster I have only seen it non-nil when GPUs are requested.
-- Paul Raines (http://help.nmr.mgh.harvard.edu)
On Tue, 17 Aug 2021 6:20am, pravin wrote:
Dear all,
I am trying to restrict users not to use nodes without GPU but no luck.
Please help me with this.
Some users are accessing the GPU nodes and submitting the job(without GPU
), so I want to restrict such users not use nodes without GPU.
Thanks
Pravin