Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit the number of running jobs in SLURM

Tags:

bash

slurm

I am queuing multiple jobs in SLURM. Can I limit the number of parallel running jobs in slurm?

Thanks in advance!

like image 728
Philipp H. Avatar asked Mar 15 '17 14:03

Philipp H.


People also ask

How do I add QOS to Slurm?

To enable the QOS priority component of the multi-factor priority calculation, the "PriorityWeightQOS" configuration parameter must be defined in the slurm. conf file and assigned an integer value greater than zero. A job's QOS only affects is scheduling priority when the multi-factor plugin is loaded.

How do I cancel all jobs on Slurm?

If you want to cancel all of your jobs then you can use scancel -u username , where username is your system username (i.e. jharri62 is my username). Often you may want to be selective and keep some jobs running, but cancel others.

What is a partition in Slurm?

Partitions in Slurm can be considered as a resource abstraction. A partition configuration defines job limits or access controls for a group of nodes.


1 Answers

If you are not the administrator, your can hold some jobs if you do not want them all to start at the same time, with scontrol hold <JOBID>, and you can delay the submission of some jobs with sbatch --begin=YYYY-MM-DD.

Also, if it is a job array, you can limit the number of jobs in the array that are concurrently running with for instance --array=1:100%25 to have 100 jobs in the array but only 25 of them running.

Finally, you can use the --dependency=singleton option that will only allow one of a set of jobs with the same --job-name to be running at a time. If you choose three names and distribute those names to all your jobs and use that option, you are effectively restricting yourself to 3 running jobs max.

like image 199
damienfrancois Avatar answered Sep 21 '22 07:09

damienfrancois