<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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 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;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.gmail-m-3334290198221689167msolistparagraph, li.gmail-m-3334290198221689167msolistparagraph, div.gmail-m-3334290198221689167msolistparagraph
        {mso-style-name:gmail-m_-3334290198221689167msolistparagraph;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Arial",sans-serif;
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.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:350448574;
        mso-list-template-ids:1906101346;}
@list l1
        {mso-list-id:1830366670;
        mso-list-type:hybrid;
        mso-list-template-ids:1995317866 1507490376 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman \(Body CS\)";}
@list l1:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l1:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l1:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi Thomas,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">We do not need to lock out jobs from the other nodes. All our jobs specify constraints and will be scheduled on nodes accordingly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">To follow your example:<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">a job with unsatisfiable constraint foo is submitted<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">the scanning tool detects the job queued and schedules another job (via constraints, not node specific) that will update
 whatever node it runs on to meet the missing constraint<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">If the “update” job runs on a node and somehow a higher priority job gets in front of the “foo” job (which could happen
 but is not common), it will sit in the queue longer, and if the node is changed then like you said the scanner will update another node if the constraint somehow goes away (e.g. another update was performed on the node).<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">We cannot make ALL nodes foo because for us “foo” is a software version (like an OS) and we have a large spread of these
 versions installed and a node cannot have 2 different versions at once.<o:p></o:p></span></li></ul>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Your example with OS’s is close. In reality, the constraint represents a version of our product software installed on a test system attached to the slurm node. We want to schedule
 jobs on different versions and we want users to be able to queue versions that are not yet installed anywhere in the cluster.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Does that make sense?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#C00000"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">Raj Sahae | </span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">m. +1 (408) 230-8531</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><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"><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 "Thomas M. Payerle" <payerle@umd.edu><br>
<b>Reply-To: </b>Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Date: </b>Thursday, August 13, 2020 at 6:21 PM<br>
<b>To: </b>Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject: </b>Re: [slurm-users] How to queue jobs based on non-existent features<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">I have not had a chance to look at you rcode, but find it intriguing, although I am not sure about use cases.  Do you do anything to lock out other jobs from the affected node?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">E.g., you submit a job with unsatisfiable constraint foo.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">The tool scanning the cluster detects a job queued with foo constraint, and sees node7 is idle, so does something to A so it can satisfy foo.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">However, before your job starts, my queued job starts running on node7 (maybe my job needs 2 nodes and only one was free at time the scanning tool chose node7).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">If the change needed for the foo feature is harmless to my job, then it is not a big deal, other than your job is queued longer (and maybe the scanning tool makes another foo node) ---<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">but in that case why not make all nodes able to satisfy foo all the time?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Maybe add a feature "generic" and have a job plugin that adds the generic feature if no other feature requested, and have the scanning tool remove generic when it adds foo.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">(And presumably scanning tool will detect when no more jobs pending jobs with foo feature set and remove it from any idle nodes, both in actual node modification and in Slurm, and
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">then add the generic feature back).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Though I can foresee possible abuses (I have a string of jobs and the cluster is busy.  My jobs don't mind a foo node, so I submit them requesting foo.  Once idle nodes are converted to foo nodes, I get an almsot defacto reservation on
 the foo nodes)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">But again, I am having trouble seeing real use cases.  Only one I can think of is maybe if want to make different OS versions available; e.g. the cluster is normally all CentOS, but if a job has a ubuntu20 flag, then the scanning tool can
 take an idle node, drain it, reimage as ubuntu20, add ubuntu20 flag, and undrain.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I <o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Aug 13, 2020 at 7:05 PM Raj Sahae <<a href="mailto:rsahae@tesla.com">rsahae@tesla.com</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"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi All,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I have developed a first solution to this issue that I brought up back in early July. I don't think it is complete
 enough to be the final solution for everyone but it does work and I think it's a good starting place to showcase the value of this feature and iterate for improvement. I wanted to let the list know in case anyone was interested in trying it themselves.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">In short, I was able to make minimal code changes to the slurmctld config and job scheduler such that I can:</span><o:p></o:p></p>
<ol start="1" type="1">
<li class="gmail-m-3334290198221689167msolistparagraph" style="mso-list:l0 level1 lfo1">
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Submit HELD jobs into the queue with sbatch, with invalid constraints, release the job with scontrol, and have it stay in the queue but not allocated.</span><o:p></o:p></li><li class="gmail-m-3334290198221689167msolistparagraph" style="mso-list:l0 level1 lfo1">
<span style="font-size:10.0pt;font-family:"Arial",sans-serif">Scan the queue with some other tool, make changes to the cluster as needed, update features, and the scheduler will pick up the new feature changes and schedule the job appropriately.</span><o:p></o:p></li></ol>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">The patch of my code changes is attached (0001-Add-a-config-option-allowing-unavailable-constraints.patch). I branched
 from the tip of 20.02 at the time, commit 34c96f1a2d.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I did attempt to do this with plugins at first but after creating skeleton plugins for a node_feature plugin and a
 scheduler plugin, I realized that the constraint check that occurs in the job scheduler happens before any of those plugins are called.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">According to the job launch logic flow (<a href="https://slurm.schedmd.com/job_launch.html" target="_blank">https://slurm.schedmd.com/job_launch.html</a>)
 perhaps I could do something in the job submit plugin but at that point I had spent 4 days playing with the plugin code and I wanted to prototype a bit faster, so I chose to make changes directly in the job scheduler.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">If anyone cares to read through the patch and try out my changes, I would be interested to know your thoughts on the
 following:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">1. How could this be done with a plugin? Should it be?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">2. This feature is incredibly valuable to me. Would it be valuable to you?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">3. What general changes need to be made to the code to make it appropriate to submit a patch to SchedMD?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">To develop and test, (I'm on MacOS), I was using a modified version of this docker compose setup (<a href="https://github.com/giovtorres/slurm-docker-cluster" target="_blank">https://github.com/giovtorres/slurm-docker-cluster</a>)
 and I would rsync my repo into the `slurm` subfolder before building the docker image. I have attached that patch as well (slurm-docker-cluster.patch).</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">To see the feature work, build with the attached slurm patch and enable the appropriate config option in your slurm.conf,
 for example if you want feature prefixes `branch-` and `commit-`, you would add the following entry:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    SchedulerDynamicFeatures=branch-,commit-</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Launch the cluster (in my case with docker-compose) and exec into any of the nodes. Then set features on the nodes:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    scontrol update c[12] Features=property-1,property-2,branch-A,commit-X</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">You should be able to submit a batch job as normal:</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    sbatch -p normal -C branch-A  -D /data test.sh</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Now queue a job with an undefined dynamic feature, it will fail to allocate (expected):</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    sbatch -p normal -C branch-B -D /data test.sh</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Now queue a HELD job with an undefined dynamic feature, then release it.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    sbatch -p normal -C branch-B -D /data -H test.sh</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    scontrol release <job_id></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">This should place an unallocated job into the queue with a reason of BadConstraints.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">You can then update a node with the new feature and it should get scheduled to run.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">    scontrol update NodeName=c1 AvailableFeatures=platform-test,branch-B ActiveFeatures=platform-test,branch-B</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hopefully that little demo works for you. We have been running with this change in a small test cluster for about 2
 weeks and so far no known issues.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Thanks,</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#C00000"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">Raj Sahae | </span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">m.
 +1 (408) 230-8531</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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 Alex Chekholko <<a href="mailto:alex@calicolabs.com" target="_blank">alex@calicolabs.com</a>><br>
<b>Reply-To: </b>Slurm User Community List <<a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a>><br>
<b>Date: </b>Friday, July 10, 2020 at 11:37 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>Re: [slurm-users] How to queue jobs based on non-existent features</span><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">Hey Raj,<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>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">To me this all sounds, at a high level, a job for some kind of lightweight middleware on top of SLURM.  E.g. makefiles or something like that.  Where each pipeline would be managed
 outside of slurm and would maybe submit a job to install some software, then submit a job to run something on that node, then run a third job to clean up / remove software.  And it would have to interact with the several slurm features that have been mentioned
 in this thread, such as features or licenses or job dependencies, or gres.<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">snakemake might be an example, but there are many others.<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">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Alex<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 Fri, Jul 10, 2020 at 11:14 AM Raj Sahae <<a href="mailto:rsahae@tesla.com" target="_blank">rsahae@tesla.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi Paddy,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Yes, this is a CI/CD pipeline. We currently use Jenkins pipelines but it has some significant drawbacks that Slurm
 solves out of the box that make it an attractive alternative.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">You noted some of them already, like good real time queue management, pre-emption, node weighting, high resolution
 priority queueing.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Jenkins also doesn’t scale as well w.r.t. node management, it’s quite resource heavy.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">My original email was a bit wordy but I should emphasize that if we want Slurm to do the exact same thing as our current
 Jenkins pipeline, we can already do that and it works reasonably well.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Now I’m trying to move beyond feature parity and am having trouble doing so.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Thanks,</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#C00000"> </span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">Raj Sahae | </span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7F7F7F">m.
 +1 (408) 230-8531</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0in 0in 0in;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">slurm-users <</span><a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank"><span style="font-size:12.0pt">slurm-users-bounces@lists.schedmd.com</span></a><span style="font-size:12.0pt;color:black">>
 on behalf of Paddy Doyle <</span><a href="mailto:paddy@tchpc.tcd.ie" target="_blank"><span style="font-size:12.0pt">paddy@tchpc.tcd.ie</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Reply-To: </b>Slurm User Community List <</span><a href="mailto:slurm-users@lists.schedmd.com" target="_blank"><span style="font-size:12.0pt">slurm-users@lists.schedmd.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Date: </b>Friday, July 10, 2020 at 10:31 AM<br>
<b>To: </b>Slurm User Community List <</span><a href="mailto:slurm-users@lists.schedmd.com" target="_blank"><span style="font-size:12.0pt">slurm-users@lists.schedmd.com</span></a><span style="font-size:12.0pt;color:black">><br>
<b>Subject: </b>Re: [slurm-users] How to queue jobs based on non-existent features</span><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>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Hi Raj,<br>
<br>
It sounds like you might be coming from a CI/CD pipeline setup, but just in<br>
case you're not, would you consider something like Jenkins or Gitlab CI<br>
instead of Slurm?<br>
<br>
The users could create multi-stage pipelines, with the 'build' stage<br>
installing the required software version, and then multiple 'test' stages<br>
to run the tests.<br>
<br>
It's not the same idea as queuing up multiple jobs. Nor do you get queue<br>
priorities or weighting and all of that good stuff from Slurm that you are<br>
looking for.<br>
<br>
Within Slurm, yeah writing custom JobSubmitPlugins and NodeFeaturesPlugins<br>
might be required.<br>
<br>
Paddy<br>
<br>
On Thu, Jul 09, 2020 at 11:15:57PM +0000, Raj Sahae wrote:<br>
<br>
> Hi all,<br>
> <br>
> My apologies if this is sent twice. The first time I sent it without my subscription to the list being complete.<br>
> <br>
> I am attempting to use Slurm as a test automation system for its fairly advanced queueing and job control abilities, and also because it scales very well.<br>
> However, since our use case is a bit outside the standard usage of Slurm, we are hitting some issues that don’t appear to have obvious solutions.<br>
> <br>
> In our current setup, the Slurm nodes are hosts attached to a test system. Our pipeline (greatly simplified) would be to install some software on the test system and then run sets of tests against it.<br>
> In our old pipeline, this was done in a single job, however with Slurm I was hoping to decouple these two actions as it makes the entire pipeline more robust to update failures and would give us more finely grained job control for the actual test run.<br>
> <br>
> I would like to allow users to queue jobs with constraints indicating which software version they need. Then separately some automated job would scan the queue, see jobs that are not being allocated due to missing resources, and queue software installs appropriately.
 We attempted to do this using the Active/Available Features configuration. We use HealthCheck and Epilog scripts to scrape the test system for software properties (version, commit, etc.) and assign them as Features. Once an install is complete and the Features
 are updated, queued jobs would start to be allocated on those nodes.<br>
> <br>
> Herein lies the conundrum. If a user submits a job, constraining to run on Version A, but all nodes in the cluster are currently configured with Features=Version-B, Slurm will fail to queue the job, indicating an invalid feature specification. I completely
 understand why Features are implemented this way, so my question is, is there some workaround or other Slurm capabilities that I could use to achieve this behavior? Otherwise my options seem to be:<br>
> <br>
> 1. Go back to how we did it before. The pipeline would have the same level of robustness as before but at least we would still be able to leverage other queueing capabilities of Slurm.<br>
> 2. Write our own Feature or Job Submit plugin that customizes this behavior just for us. Seems possible but adds lead time and complexity to the situation.<br>
> <br>
> It's not feasible to update the config for all branches/versions/commits to be AvailableFeatures, as our branch ecosystem is quite large and the maintenance of that approach would not scale well.<br>
> <br>
> Thanks,<br>
> <br>
> Raj Sahae | Manager, Software QA<br>
> 3500 Deer Creek Rd, Palo Alto, CA 94304<br>
> m. +1 (408) 230-8531 | <a href="mailto:rsahae@tesla.com" target="_blank">rsahae@tesla.com</a><file:///composeviewinternalloadurl/%<a href="mailto:3Cmailto%3Arsahae@tesla.com" target="_blank">3Cmailto:rsahae@tesla.com</a>%3E><br>
> <br>
> [cid:image001.png@01D6560C.399F5D30]<<a href="http://www.tesla.com" target="_blank">http://www.tesla.com/</a>><br>
> <br>
<br>
<br>
<br>
-- <br>
Paddy Doyle<br>
Research IT / Trinity Centre for High Performance Computing,<br>
Lloyd Building, Trinity College Dublin, Dublin 2, Ireland.<br>
Phone: +353-1-896-3725<br>
<a href="https://www.tchpc.tcd.ie" target="_blank">https://www.tchpc.tcd.ie/</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Tom Payerle <br>
DIT-ACIGS/Mid-Atlantic Crossroads        <a href="mailto:payerle@umd.edu" target="_blank">
payerle@umd.edu</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">5825 University Research Park               (301) 405-6135<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">University of Maryland<br>
College Park, MD 20740-3831<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>