<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=utf-8">
<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:0in;
        font-size:10.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:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">For later reference, [1] should be the (current) authoritative source on data types for the job_desc values: some strings, some numbers, some booleans.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">[1] https://github.com/SchedMD/slurm/blob/4c21239d420962246e1ac951eda90476283e7af0/src/plugins/job_submit/lua/job_submit_lua.c#L450<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></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 Christopher Benjamin Coffey <Chris.Coffey@nau.edu><br>
<b>Date: </b>Tuesday, February 22, 2022 at 11:02 AM<br>
<b>To: </b>Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject: </b>Re: [slurm-users] Can job submit plugin detect "--exclusive" ?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">External Email Warning<br>
<br>
This email originated from outside the university. Please use caution when opening attachments, clicking links, or responding to requests.<br>
<br>
________________________________<br>
<br>
Hi Greg,<br>
<br>
Thank you! The key was to use integer boolean instead of true/false. It seems this is inconsistent for job_desc elements as some use true/false. Have a great one!<br>
<br>
Best,<br>
Chris<br>
<br>
--<br>
Christopher Coffey<br>
High-Performance Computing<br>
Northern Arizona University<br>
928-523-1167<br>
<br>
<br>
<br>
On 2/18/22, 9:09 PM, "slurm-users on behalf of Greg Wickham" <slurm-users-bounces@lists.schedmd.com on behalf of greg.wickham@kaust.edu.sa> wrote:<br>
<br>
    Hi Chris,<br>
<br>
    You mentioned “But trials using this do not seem to be fruitful so far.” . . why?<br>
<br>
    In our job_submit.lua there is:<br>
<br>
<br>
        if job_desc.shared == 0 then<br>
          slurm.user_msg("exclusive access is not permitted with GPU jobs.")<br>
          slurm.user_msg("Remove '--exclusive' from your job submission script")<br>
          return ESLURM_NOT_SUPPORTED<br>
        end<br>
<br>
    and testing:<br>
<br>
    $ srun --exclusive --time 00:10:00 --gres gpu:1 --pty /bin/bash -i<br>
    srun: error: exclusive access is not permitted with GPU jobs.<br>
    srun: error: Remove '--exclusive' from your job submission script<br>
    srun: error: Unable to allocate resources: Requested operation is presently disabled<br>
<br>
    In slurm.h the job_descriptor struct has:<br>
<br>
            uint16_t shared;        /* 2 if the job can only share nodes with other<br>
                                     *   jobs owned by that user,<br>
                                     * 1 if job can share nodes with other jobs,<br>
                                     * 0 if job needs exclusive access to the node,<br>
                                     * or NO_VAL to accept the system default.<br>
                                     * SHARED_FORCE to eliminate user control. */<br>
<br>
    If there’s a case where using “.shared” isn’t working please let us know.<br>
<br>
       -Greg<br>
<br>
<br>
    From: slurm-users <slurm-users-bounces@lists.schedmd.com> on behalf of Christopher Benjamin Coffey <Chris.Coffey@nau.edu><br>
    Date: Saturday, 19 February 2022 at 3:17 am<br>
    To: slurm-users <slurm-users@lists.schedmd.com><br>
    Subject: [EXTERNAL] [slurm-users] Can job submit plugin detect "--exclusive" ?<br>
<br>
    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<br>
     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<br>
     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>
<br>
<br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</body>
</html>