With the Slurm workload manager how can I prevent more jobs from user bob
from starting? Existing jobs should continue to run. The user should be able to submit more jobs but they shouldn't be able to start.
Asked
Active
Viewed 1,208 times
1
Levi Morrison
- 111
- 5
1 Answers
0
Slurm's sacctmgr
command can be used to modify various limits per user. You need to be an account coordinator for the account in question or root. Setting either one of these to 0
should do the trick:
MaxJobs
GrpJobs
As an example:
$ sacctmgr modify user where name=bob set MaxJobs=0
After a few minutes if you run squeue
on the user you should see something like this:
$ squeue -u bob -o "%i %r"
JOBID REASON
20582420 AssocMaxJobsLimit
20583282 Dependency
Note that the Dependency
reason seems to take precedence over the user limits, but it won't run anyway because it is waiting for the other job to run. Similarly JobArrayTaskLimit
will take precedence over the user limits but the job won't start.
To remove the limit set the value to -1
:
$ sacctmgr modify user where name=bob set MaxJobs=-1
You can show the existing limits for a user with:
$ sacctmgr list assoc User=bob
Levi Morrison
- 111
- 5