<div dir="ltr">Hello Michael,<div><br></div><div>I don't have an elegant solution, but I'm writing mostly to +1 this. I didn't catch this in the release notes but am concerned if it is indeed the new behavior. Researchers use scripts that rely on --cpus-per-task (or -c) as part of, e.g., SBATCH directives. I suppose you could simply include something like this, unless someone knows why it wouldn't work, but even if so it seems inelegant:</div><div><br></div><div>SRUN_CPUS_PER_TASK = $SLURM_CPUS_PER_TASK<br></div><div><br></div><div>A related question I have, which has come up a couple of times in various other contexts, is truly understanding the difference, in a submit script, between including srun and not, for example:</div><div><br></div><div>srun myscript</div><div>myscript</div><div><br></div><div>People have asked whether srun is required, or what the difference is if it is not included, and honestly it seems like the common reply is that "it doesn't matter that much." But, nobody that I've seen (and I've not done an exhaustive search) has articulated whether it actually matters to use srun within a batch script. Because if this is now the behavior, it appears that simply not using srun will still permit the task to use --cpus-per-task.</div><div><br></div><div>Warmest regards,</div><div>Jason</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 20, 2023 at 5:00 AM Michael Müller <<a href="mailto:Michael.Mueller12@tu-dresden.de">Michael.Mueller12@tu-dresden.de</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">Hello,<br>
<br>
I haven't really seen this discussed anywhere, but maybe I didn't look <br>
in the right places.<br>
<br>
After our upgrade from 21.08 to 23.02 we had users complaining about <br>
srun not using the specified --cpus-per-task given in sbatch-directives. <br>
The changelog of 22.05 mentions this change and explains the need to set <br>
the Environment variable SRUN_CPUS_PER_TASK. The environment variable <br>
SLURM_CPUS_PER_TASK will be set by the sbatch-directive, but is ignored <br>
by srun.<br>
<br>
Does anyone know why this behaviour was changed? Imo the expectation <br>
that an sbatch-directive is the default for the whole job-script is <br>
reasonable.<br>
<br>
Is there a config option to reenable the old behaviour, or do we have to <br>
find a workaround with a job_submit script or a profile.d script? If so, <br>
have any of you already implemented such a workaround?<br>
<br>
<br>
With kind regards<br>
Michael<br>
<br>
-- <br>
Michael Müller<br>
Application Developer<br>
<br>
Dresden University of Technology<br>
Center of Information Services and High Performance Computing (ZIH)<br>
Department of Interdisciplinary Application Development and Coordination (IAK)<br>
01062 Dresden<br>
<br>
phone: (0351)463-35261<br>
www:<a href="http://www.tu-dresden.de/zih" rel="noreferrer" target="_blank">www.tu-dresden.de/zih</a><br>
<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;margin:0px"><span style="color:rgb(130,36,51)"><font face="Century Gothic"><b>Jason L. Simms, Ph.D., M.P.H.</b></font></span></div><font face="Century Gothic">Manager of Research Computing</font><br></div><div dir="ltr"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;margin:0px"><font face="Century Gothic"><span style="color:gray">Swarthmore College<br>Information Technology Services</span></font></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;margin:0px"><font face="Century Gothic"><span style="color:gray">(610) 328-8102<br></span></font></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;margin:0px"><font face="Century Gothic">Schedule a meeting: </font><span style="font-family:Arial,Helvetica,sans-serif;font-size:small;color:rgb(32,33,36)"><a href="https://calendly.com/jlsimms" target="_blank">https://calendly.com/jlsimms</a></span><br></div></div></div></div></div></div>