<html 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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {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:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-AU" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Chris,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">You mentioned “</span>But trials using this do not seem to be fruitful so far.” . . why?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In our job_submit.lua there is:<br>
<br>
<span style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">    if job_desc.shared == 0 then<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">      slurm.user_msg("exclusive access is not permitted with GPU jobs.")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">      slurm.user_msg("Remove '--exclusive' from your job submission script")<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">      return ESLURM_NOT_SUPPORTED<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">    end<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">and testing:<br>
<br>
$ srun --exclusive --time 00:10:00 --gres gpu:1 --pty /bin/bash -i <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">srun: error: exclusive access is not permitted with GPU jobs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">srun: error: Remove '--exclusive' from your job submission script<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">srun: error: Unable to allocate resources: Requested operation is presently disabled<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">In slurm.h the job_descriptor struct has:<br>
<br>
        uint16_t shared;        /* 2 if the job can only share nodes with other<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">                                 *   jobs owned by that user,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">                                 * 1 if job can share nodes with other jobs,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">                                 * 0 if job needs exclusive access to the node,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">                                 * or NO_VAL to accept the system default.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">                                 * SHARED_FORCE to eliminate user control. */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">If there’s a case where using “.shared” isn’t working please let us know.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">   -Greg<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.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 Christopher Benjamin Coffey <Chris.Coffey@nau.edu><br>
<b>Date: </b>Saturday, 19 February 2022 at 3:17 am<br>
<b>To: </b>slurm-users <slurm-users@lists.schedmd.com><br>
<b>Subject: </b>[EXTERNAL] [slurm-users] Can job submit plugin detect "--exclusive" ?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
Hello!<br>
<br>
The job_submit plugin doesn't appear to have a way to detect whether a user requested "--exclusive". Can someone confirm this? Going through the code: src/plugins/job_submit/lua/job_submit_lua.c I don't see anything related. Potentially "shared" could be possible
 in some way. But trials using this do not seem to be fruitful so far.<br>
<br>
If a user requests --exclusive, I'd like to append "--exclude=<nodes>" on to their job request to keep them off of certain nodes. For instance, we have our gpu nodes in a default partition with a high priority so that jobs don't land on them until last. And
 this is the same for our highmem nodes. Normally this works fine, but if someone asks for "--exclusive" this will land on these nodes quite often unfortunately.<br>
<br>
Any ideas? Of course, I could take these nodes out of the partition, yet I'd like to see if something like this would be possible.<br>
<br>
Thanks! :)<br>
<br>
Best,<br>
Chris<br>
 <br>
-- <br>
Christopher Coffey<br>
High-Performance Computing<br>
Northern Arizona University<br>
928-523-1167<br>
 <br>
 <o:p></o:p></p>
</div>
</div>
</body>
</html>