[slurm-users] Limit partition to 1 job at a time

206 views
Skip to first unread message

Russell Jones

unread,
Mar 22, 2022, 11:41:14 AM3/22/22
to slurm...@schedmd.com
Hi all,

For various reasons, we need to limit a partition to being able to run max 1 job at a time. Not 1 job per user, but 1 job total at a time, while queuing any other jobs to run after this one is complete.

I am struggling to figure out how to do this. Any tips?

Thanks!

Paul Edmon

unread,
Mar 22, 2022, 11:48:46 AM3/22/22
to slurm...@lists.schedmd.com
I think you could do this by clever use of a partition level QoS but I
don't have an obvious way of doing this.

-Paul Edmon-

Gerhard Strangar

unread,
Mar 22, 2022, 1:45:14 PM3/22/22
to slurm...@lists.schedmd.com
Russell Jones wrote:

> I am struggling to figure out how to do this. Any tips?

Create a QoS with GrpJobs=1 and assign it to the partition?

Russell Jones

unread,
Mar 23, 2022, 11:09:02 AM3/23/22
to Slurm User Community List
Thanks!

I suppose I am confused about how GrpJobs works. The manual shows: 

The total number of jobs able to run at any given time from an association and its children QOS


It is my understanding an association is cluster + account + user. Would this not just limit it to 1 job per user in the partition, not 1 job at a time total in the partition?

Gerhard Strangar

unread,
Mar 23, 2022, 1:15:46 PM3/23/22
to slurm...@lists.schedmd.com
Russell Jones wrote:

> I suppose I am confused about how GrpJobs works. The manual shows:
>
> The total number of jobs able to run at any given time from an association
> and its children QOS
>
>
> It is my understanding an association is cluster + account + user. Would
> this not just limit it to 1 job per user in the partition, not 1 job at a
> time total in the partition?

I'm using GrpTRES to limit the number of cores per partition - and thats
not per user. So I'm assuming that MaxJobs is per user, GrpJobs is not.

Chris Samuel

unread,
Mar 28, 2022, 8:27:48 PM3/28/22
to slurm...@lists.schedmd.com
On 22/3/22 11:40 am, Russell Jones wrote:

> I am struggling to figure out how to do this. Any tips?

My only thought to achieve this would be to define a license for the
partition with a count of 1 and to use the job submit filter to ensure
that any job that is submitted to (or ends up being directed to) that
partition requests that one license.

Best of luck!
Chris
--
Chris Samuel : http://www.csamuel.org/ : Berkeley, CA, USA

Reply all
Reply to author
Forward
0 new messages