<div dir="ltr">Hi all,<div><br></div><div>Thanks for your comments and suggestions.</div><div>Using --exclusive does not solve my issue because I need ntasks to get set by Slurm to the MAX possible.</div><div>What I want is to request a fixed number of nodes with --nodes=N and --ntasks=MAX , so that Slurm provides 2 nodes and sets then ntasks to the max possible, depending on the nodes selected.</div><div>So for example if I request 2 nodes and I get them from the 40 cores partition, then ntasks gets set to 80 by Slurm. If those nodes are from the 2nd partition with 48 cores each node, then Slurm should set ntasks to 96.</div><div>The request seems a bit odd, but I have a commercial software (Altair) that is using "scontrol show ..." output to set the number of processes/tasks to start. I cannot manipulate that in my script.</div><div>But probably I will have to stop telling Altair I am using Slurm so it does not use "scontrol show ...", and create all parallel settings myself using SLURM's variables as Troy suggested.</div><div><br></div><div>Thanks,</div><div>Richard</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 22 Mar 2022 at 12:22, Baer, Troy <<a href="mailto:troy@osc.edu">troy@osc.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Requesting --exclusive and then using $SLURM_CPUS_ON_NODE to determine the number of the tasks or threads to use inside the job script would be my recommendation.<br>
<br>
        --Troy<br>
<br>
-----Original Message-----<br>
From: slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> On Behalf Of Tina Friedrich<br>
Sent: Tuesday, March 22, 2022 10:43 AM<br>
To: <a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a><br>
Subject: Re: [slurm-users] Use all cores when submitting to heterogeneous nodes<br>
<br>
Hi Richard,<br>
<br>
...what's wrong with using '--exclusive'? I mean if you're wanting all <br>
cores on the node anyway, wouldn't asking for it exclusively be pretty <br>
much the same thing?<br>
<br>
Tina<br>
<br>
On 22/03/2022 14:29, Richard Ems wrote:<br>
> Hi all,<br>
> <br>
> I am looking for an option to use all cores when submitting to <br>
> heterogeneous nodes.<br>
> In this case I have 2 partitions:<br>
> part1:  #N1 nodes, each node has 40 cores<br>
> part2:  #N2 nodes, each node has 48 cores<br>
> <br>
> I want to submit to both partitions, requesting a number of nodes and <br>
> then set<br>
> --ntasks=40*#nodes<br>
>   or<br>
> --ntasks=48*#nodes<br>
> depending on which partition gets selected by Slurm.<br>
> Can this be done?<br>
> <br>
> An option similar to --ntasks=USE_ALL_CORES would be great.<br>
> <br>
> Many thanks,<br>
> Richard<br>
> <br>
> -- <br>
> Richard Ems     /     aiduit     / <a href="mailto:r.ems@aiduit.com" target="_blank">r.ems@aiduit.com</a> <br>
> <mailto:<a href="mailto:r.ems@aiduit.com" target="_blank">r.ems@aiduit.com</a>><br>
<br>
-- <br>
Tina Friedrich, Advanced Research Computing Snr HPC Systems Administrator<br>
<br>
Research Computing and Support Services<br>
IT Services, University of Oxford<br>
<a href="https://urldefense.com/v3/__http://www.arc.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccwzudcC6u$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://www.arc.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccwzudcC6u$</a>  <a href="https://urldefense.com/v3/__http://www.it.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccw4ucG3qS$" rel="noreferrer" target="_blank">https://urldefense.com/v3/__http://www.it.ox.ac.uk__;!!KGKeukY!gMufcIC3i58UdzqvJu5NJgHD5TdADngBaj6rq48GMTu5RjsPPTccw4ucG3qS$</a> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard Ems     /     aiduit     /     <a href="mailto:r.ems@aiduit.com" target="_blank">r.ems@aiduit.com</a><br></div></div>