<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Helvetica Neue";
        panose-1:2 0 5 3 0 0 0 2 0 4;}
@font-face
        {font-family:Times;
        panose-1:0 0 5 0 0 0 0 2 0 0;}
@font-face
        {font-family:"Source Code Pro";
        panose-1:2 11 5 9 3 4 3 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1729920285;
        mso-list-template-ids:820934682;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">On a quick read, it did look correct.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">slurm-users <slurm-users-bounces@lists.schedmd.com> on behalf of Ratnasamy, Fritz <fritz.ratnasamy@chicagobooth.edu><br>
<b>Date: </b>Monday, September 27, 2021 at 1:59 PM<br>
<b>To: </b>Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject: </b>Re: [slurm-users] EXTERNAL-Re: Block jobs on GPU partition when GPU is not specified<o:p></o:p></span></p>
</div>
<p align="center" style="margin:0in;text-align:center;background:white"><b><span style="font-size:12.0pt;color:red;background:white">External Email Warning</span></b><o:p></o:p></p>
<p align="center" style="mso-margin-top-alt:0in;margin-right:12.0pt;margin-bottom:0in;margin-left:12.0pt;text-align:center;background:white">
<b><span style="font-size:12.0pt;color:red">This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.</span></b><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div>
<div>
<p class="MsoNormal">Does the script below look correct? <br>
<span style="font-family:"Courier New"">function slurm_job_submit(job_desc, part_list, submit_uid)<br>
<br>
        if job_desc.partition == 'gpu' then<br>
                     if  (job_desc.gres == nil) then<br>
                              slurm.log_info("User did not specified gres=gpu: ")<br>
                              slurm.user_msg("You have to specify gres=gpu:x  where x is number of GPUs.")<br>
                              return slurm.ERROR<br>
                     end<br>
        end<br>
end</span><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Fritz Ratnasamy</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Data Scientist</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Information Technology</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">The University of Chicago</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Booth School of Business</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">5807 S. Woodlawn</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Chicago,</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">Illinois</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">60637</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Phone: +(1) 773-834-4556</span><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Sep 27, 2021 at 1:40 PM Renfro, Michael <<a href="mailto:Renfro@tntech.edu">Renfro@tntech.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Might need a restart of slurmctld at most, I expect.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> on behalf of Ratnasamy, Fritz <<a href="mailto:fritz.ratnasamy@chicagobooth.edu" target="_blank">fritz.ratnasamy@chicagobooth.edu</a>><br>
<b>Date: </b>Monday, September 27, 2021 at 12:32 PM<br>
<b>To: </b>Slurm User Community List <<a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a>><br>
<b>Subject: </b>Re: [slurm-users] EXTERNAL-Re: Block jobs on GPU partition when GPU is not specified</span><o:p></o:p></p>
</div>
<p align="center" style="margin:0in;text-align:center;background:white"><b><span style="font-size:12.0pt;color:red;background:white">External Email Warning</span></b><o:p></o:p></p>
<p align="center" style="mso-margin-top-alt:5.0pt;margin-right:12.0pt;margin-bottom:0in;margin-left:12.0pt;text-align:center;background:white">
<b><span style="font-size:12.0pt;color:red">This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.</span></b><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Michael Renfro, 
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>
Thanks for your reply. Based on your answers, would this work: <br>
1/ a function job_submit.lua with the following contents (just need a function that errored when gres:gpu is not specified in srun or in sbatch): <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">function slurm_job_submit(job_desc, part_list, submit_uid)<br>
<br>
        if job_desc.partition == 'gpu' then<br>
                     if  (job_desc.gres == nil) then<br>
                              slurm.log_info("User did not specified gres=gpu: ")<br>
                              slurm.user_msg("You have to specify gres=gpu:x  where x is number of GPUs.")<br>
                              return slurm.ERROR<br>
                     end<br>
        end<br>
end<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">4/  I found out a file  the file job_submit_lua.so in our controller in /lib64/slurm/ and also the lua lib seems to be installed: <br>
 sudo rpm -qa | grep lua<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">lua-5.3.4-11.el8.x86_64<br>
lua-libs-5.3.4-11.el8.x86_64<br>
lua-devel-5.3.4-11.el8.x86_64<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> so I guess for now I just need to create job_submit.lua, uncomment the job plugin in slurm.conf/ is there any Slurm service to restart after that?<br>
<br>
Thanks again<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Fritz Ratnasamy</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Data Scientist</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Information Technology</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">The University of Chicago</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Booth School of Business</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">5807 S. Woodlawn</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Chicago,</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">Illinois</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">60637</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Phone: +(1) 773-834-4556</span><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Sat, Sep 25, 2021 at 11:08 AM Renfro, Michael <<a href="mailto:Renfro@tntech.edu" target="_blank">Renfro@tntech.edu</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l0 level1 lfo1">
That seems reasonable, but our script just checks if there's a gres at all. I don't *think* any gres other than gres=gpu would let the job run, since our GPU nodes only have Gres=gpu:2 entries. Same thing for asking for more GPUs than are in the node: if someone
 asked for gres=gpu:3 or higher, the job would get blocked.<br>
<br>
The above might be an annoyance to your users if their job just sits in the queue with no other notice, but it hasn't really been an issue here. The big benefit from your side would be that you could simplify the if statement down to something like 'if (job_desc.gres
 ~= nil)'.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l0 level1 lfo1">
yes, uncomment JobSubmitPlugins=lua<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l0 level1 lfo1">
Far as I know, if you uncomment the JobSubmitPlugin line and have a job_submit.lua file in the same folder as your slurm.conf, the Lua script should get executed automatically.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Our RPM installations of Slurm contained the job_submit_lua.so, both for Bright 8 and for OpenHPC.<o:p></o:p></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[1]
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSchedMD%2Fslurm%2Fblob%2Fmaster%2Fcontribs%2Flua%2Fjob_submit.lua&data=04%7C01%7Crenfro%40tntech.edu%7C82afe58bec4f4e9074d508d981e8e784%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637683659596087929%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iaXsHeUHlDOr8vfcEB05EYlrmrozBeSOGiA8AUASCtw%3D&reserved=0" target="_blank">
https://github.com/SchedMD/slurm/blob/master/contribs/lua/job_submit.lua</a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">[2]
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgist.github.com%2Fmikerenfro%2Fdf89fac5052a45cc2c1651b9a30978e0&data=04%7C01%7Crenfro%40tntech.edu%7C82afe58bec4f4e9074d508d981e8e784%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637683659596087929%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5aYetj4vWvfvml4bbcfSPuRs%2FNUTV1rnmfZajh2EXOE%3D&reserved=0" target="_blank">
https://gist.github.com/mikerenfro/df89fac5052a45cc2c1651b9a30978e0</a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> on behalf of Ratnasamy, Fritz <<a href="mailto:fritz.ratnasamy@chicagobooth.edu" target="_blank">fritz.ratnasamy@chicagobooth.edu</a>><br>
<b>Date: </b>Saturday, September 25, 2021 at 12:23 AM<br>
<b>To: </b>Slurm User Community List <<a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a>><br>
<b>Subject: </b>[slurm-users] Block jobs on GPU partition when GPU is not specified</span><o:p></o:p></p>
</div>
<p align="center" style="margin:0in;text-align:center;background:white"><b><span style="font-size:12.0pt;color:red;background:white">External Email Warning</span></b><o:p></o:p></p>
<p align="center" style="mso-margin-top-alt:5.0pt;margin-right:12.0pt;margin-bottom:0in;margin-left:12.0pt;text-align:center;background:white">
<b><span style="font-size:12.0pt;color:red">This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.</span></b><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi, <br>
<br>
I would like to block jobs submitted in our GPU partition when gres=gpu:1 (or any number between 1 and 4) is not specified when submitting a job through sbatch or requesting an interactive session with srun. 
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Currently, /etc/slurm/slurm.conf has JobSumitPlugins=lua commented. <br>
The liblua.so is now installed. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I would like to use something similar as the example mentioned at the end of the page: <br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fslurm.schedmd.com%2Fresource_limits.html%250b&data=04%7C01%7Crenfro%40tntech.edu%7C82afe58bec4f4e9074d508d981e8e784%7C66fecaf83dc04d2cb8b8eff0ddea46f0%7C1%7C0%7C637683659596097929%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=lQo4wHXSanS20PJkNl24pZDWNl25BbsJv30LggCBUSQ%3D&reserved=0" target="_blank">https://slurm.schedmd.com/resource_limits.html<br>
</a>Can I use the following code : <o:p></o:p></p>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">function slurm_job_submit(job_desc, part_list, submit_uid)</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">   if (job_desc.gres ~= nil)</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">   then</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">      for g in job_desc.gres:gmatch("[^,]+")</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">      do</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">         bad = string.match(g,'^gpu[:]*[0-9]*$')</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">         if (bad ~= nil)</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">         then</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">            slurm.log_info("User specified gpu GRES without type: %s", bad)</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">            slurm.user_msg("You must always specify a type when requesting gpu GRES")</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">            return slurm.ERROR</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">         end</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">      end</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">   end</span><o:p></o:p></pre>
<pre style="margin-bottom:.25in;line-height:18.0pt;background:#333333;vertical-align:baseline"><span style="font-size:9.5pt;font-family:"Source Code Pro";color:#EEEEEE">end</span><o:p></o:p></pre>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I do not need to check if the model is specified though. In that case, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">1/ Should I change the line bad = string.match(g,'^gpu[:]*[0-9]*$') to string.match(g,'^gpu[:]*[0-9]') <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2/ Do I need to uncomment  JobSumitPlugins=lua<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">3/ Where to specify the function call slurm_job_submit so I make sure the check to see if gres=gpu:1 is happening?<br>
4/ I would need job_submit_lua.so, where can I find that library and if it is not there, how can i dowload it? <br>
<br>
Thanks for your help. I am new to regular expressions, lua and Slurm so I apologize if my questions do not make sense. <br>
<br>
<br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Fritz Ratnasamy</span></b><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Data Scientist</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#9C1D21">Information Technology</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">The University of Chicago</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Booth School of Business</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">5807 S. Woodlawn</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Chicago,</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">Illinois</span><span style="font-size:10.5pt;font-family:"Helvetica Neue";color:#333333"> </span><span style="font-size:10.5pt;font-family:Times;color:#676E73">60637</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background-image:initial;background-position:initial;background-repeat:initial">
<span style="font-size:10.5pt;font-family:Times;color:#676E73">Phone: +(1) 773-834-4556</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="border:solid #9C6500 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.0pt;background:#FFEB9C">
<span style="font-size:10.0pt;color:#9C6500">CAUTION:</span><span style="font-size:10.0pt;color:black"> 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.</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>