function slurm_job_submit(job_desc, part_list, submit_uid)
if (job_desc.gres ~= nil)
then
for g in job_desc.gres:gmatch("[^,]+")
do
bad = string.match(g,'^gpu[:]*[0-9]*$')
if (bad ~= nil)
then
slurm.log_info("User specified gpu GRES without type: %s", bad)
slurm.user_msg("You must always specify a type when requesting gpu GRES")
return slurm.ERROR
end
end
end
endI do not need to check if the model is specified though. In that case, Fritz Ratnasamy
Data Scientist
Information Technology
The University of Chicago
Booth School of Business
5807 S. Woodlawn
Chicago, Illinois 60637
Phone: +(1) 773-834-4556
If you haven't already seen it there's an example Lua script from SchedMD at [1], and I've got a copy of our local script at [2]. Otherwise, in the order you asked:
[1] https://github.com/SchedMD/slurm/blob/master/contribs/lua/job_submit.lua
[2] https://gist.github.com/mikerenfro/df89fac5052a45cc2c1651b9a30978e0
From:
slurm-users <slurm-use...@lists.schedmd.com> on behalf of Ratnasamy, Fritz <fritz.r...@chicagobooth.edu>
Date: Saturday, September 25, 2021 at 12:23 AM
To: Slurm User Community List <slurm...@lists.schedmd.com>
Subject: [slurm-users] Block jobs on GPU partition when GPU is not specified
External Email Warning
This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.
Fritz Ratnasamy
Data Scientist
Information Technology
The University of Chicago
Booth School of Business
5807 S. Woodlawn
Chicago, Illinois 60637
Phone: +(1) 773-834-4556
CAUTION: This email has originated outside of University email systems. Please do not click links or open attachments unless you recognize the sender and trust the contents as safe.
Might need a restart of slurmctld at most, I expect.
Fritz Ratnasamy
Data Scientist
Information Technology
The University of Chicago
Booth School of Business
5807 S. Woodlawn
Chicago, Illinois 60637
Phone: +(1) 773-834-4556
On a quick read, it did look correct.