FYI, I submitted a bug about this in March because the "compatible" line in the 
docs was confusing to me as well.  The change coming to the docs removes that 
altogether and simply says that setting it to OFF "disables job preemption and 
gang scheduling".  Much clearer.

And we do it the same way as Davide.

Rob

________________________________
From: Davide DelVento via slurm-users <slurm-users@lists.schedmd.com>
Sent: Thursday, May 2, 2024 11:28 AM
To: Jason Simms <jsim...@swarthmore.edu>
Cc: Slurm User Community List <slurm-users@lists.schedmd.com>
Subject: [slurm-users] Re: Partition Preemption Configuration Question

Hi Jason,

I wanted exactly the same and was confused exactly like you. For a while it did 
not work, regardless of what I tried, but eventually (with some help) I figured 
it out.

What I set up and it is working fine is this globally

PreemptType = preempt/partition_prio
PreemptMode=REQUEUE

and then individually each partition definition has either PreemptMode=off or 
PreemptMode=cancel

It took me a while to make it work, and the problem in my case was that I did 
not include the requeue line because (as I am describing) I did not want 
requeue, but without that line slurm preemption simply would not work. Since 
it's overridden in each partition, then it works as if it's not there, but it 
must be there. Very simple once you know it.

Hope this helps

On Thu, May 2, 2024 at 9:16 AM Jason Simms via slurm-users 
<slurm-users@lists.schedmd.com<mailto:slurm-users@lists.schedmd.com>> wrote:
Hello all,

The Slurm docs have me a bit confused... I'm wanting to enable job preemption 
on certain partitions but not others. I *presume* I would set 
PreemptType=preempt/partition_prio globally, but then on the partitions where I 
don't want jobs to be able to be preempted, I would set PreemptMode=off within 
the configuration for that specific partition.

The documentation, however, says that setting PreemptMode=off at a partition 
level "is only compatible with PreemptType=preempt/none at a global level" yet 
then immediately says that doing so is a "common use case for this parameter is 
to set it on a partition to disable preemption for that partition," which 
indicates preemption would still be allowable for other partitions.

If PreemptType is set to preempt/none globally, and I *cannot* set that as an 
option for a given partition (at least, the documentation doesn't indicate that 
is a valid parameter for a partition), wouldn't preemption be disabled globally 
anyway? The wording seems odd to me and almost contradictory.

Is it possible to have PreemptType=preempt/partition_prio set globally, yet 
also disable it on specific partitions with PreemptMode=off? Is PreemptType 
actually a valid configuration option for specific partitions?

Thanks for any guidance.

Warmest regards,
Jason

--
Jason L. Simms, Ph.D., M.P.H.
Manager of Research Computing
Swarthmore College
Information Technology Services
(610) 328-8102
Schedule a meeting: https://calendly.com/jlsimms

--
slurm-users mailing list -- 
slurm-users@lists.schedmd.com<mailto:slurm-users@lists.schedmd.com>
To unsubscribe send an email to 
slurm-users-le...@lists.schedmd.com<mailto:slurm-users-le...@lists.schedmd.com>
-- 
slurm-users mailing list -- slurm-users@lists.schedmd.com
To unsubscribe send an email to slurm-users-le...@lists.schedmd.com

Reply via email to