[slurm-users] Disable exclusive flag for users
Bjørn-Helge Mevik
b.h.mevik at usit.uio.no
Fri Mar 25 07:54:28 UTC 2022
pankajd <pankajd at cdac.in> writes:
> We have slurm 21.08.6 and GPUs in our compute nodes. We want to restrict /
> disable the use of "exclusive" flag in srun for users. How should we do it?
Two options would be to use the CLI_filter plugin or the job_submit
plugin. If you want the enforcement to be guaranteed, then the
job_submit plugin is the place (cli_filter can be circumvented by user).
For instance, in job_submit.lua:
if job_desc.shared == 0 or job_desc.shared == 2 or job_desc.shared == 3 then
slurm.user_msg ("Warning! Please do not use --exclusive unless you really know what you are doing. Your job might be accounted for more CPUs than it actually uses, sometimes many times more. There are better ways to specify using whole nodes, for instance using all cpus on the node or all memory on the node.")
end
or in cli_filter.lua:
is_bad_exclusive = { exclusive = true, user = true, mcs = true }
if is_bad_exclusive[options["exclusive"]] then
slurm.log_info("Warning! Please do not use --exclusive unless you really know what you are doing. Your job might be accounted for more CPUs than it actually uses, sometimes many times more. There are better ways to specify using whole nodes, for instance using all cpus on the node or all memory on the node.")
end
(both of these just warn, though, but should be easy to change into
rejecting the job.)
--
Regards,
Bjørn-Helge Mevik, dr. scient,
Department for Research Computing, University of Oslo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20220325/dd814577/attachment.sig>
More information about the slurm-users
mailing list