Questions tagged [slurm]

Slurm (formerly spelled SLURM) is an open-source resource manager designed for Linux HPC clusters of all sizes.

Slurm: A Highly Scalable Resource Manager

Slurm is an open-source resource manager designed for Linux clusters of all sizes. It provides three key functions. First it allocates exclusive and/or non-exclusive access to resources (computer nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (typically a parallel job) on a set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work.

Slurm's design is very modular with dozens of optional plugins. In its simplest configuration, it can be installed and configured in a couple of minutes (see Caos NSA and Perceus: All-in-one Cluster Software Stack by Jeffrey B. Layton) and was used by Intel on their 48-core "cluster on a chip". More complex configurations can satisfy the job scheduling needs of world-class computer centers and rely upon a MySQL database for archiving accounting records, managing resource limits by user or bank account, or supporting sophisticated job prioritization algorithms.

While other resource managers do exist, Slurm is unique in several respects:

  • It is designed to operate in a heterogeneous cluster counting over 100,000 nodes and millions of processors.
  • It can sustain a throughput rate of hundreds of thousands jobs per hour with bursts of job submissions at several times that rate.
  • Its source code is freely available under the GNU General Public License.
  • It is portable; written in C and using the GNU autoconf configuration engine. While initially written for Linux, other UNIX-like operating systems should be easy porting targets.
  • It is highly tolerant of system failures, including failure of the node executing its control functions.
  • A plugin mechanism exists to support various interconnects, authentication mechanisms, schedulers, etc. These plugins are documented and simple enough for the motivated end user to understand the source and add functionality.
  • Configurable node power control functions allow putting idle nodes into a power-save/power-down mode. This is especially useful for "elastic burst" clusters which expand dynamically to a cloud virtual machine (VM) provider to accommodate workload bursts.

Resources and Tutorials:

Name Spelling

As of v18.08, the name spelling “SLURM” has been changed to “Slurm” (commit 3d7ada78e).

1145 questions
111
votes
2 answers

SLURM `srun` vs `sbatch` and their parameters

I am trying to understand what the difference is between SLURM's srun and sbatch commands. I will be happy with a general explanation, rather than specific answers to the following questions, but here are some specific points of confusion that can…
dkv
  • 4,553
  • 6
  • 23
  • 44
74
votes
1 answer

Adding time to a running slurm job

I have a job running a linux machine managed by slurm. Now that the job is running for a few hours I realize that I underestimated the time required for it to finish and thus the value of the --time argument I specified is not enough. Is there a way…
user1701545
  • 4,770
  • 12
  • 38
  • 72
59
votes
5 answers

Find out the CPU time and memory usage of a slurm job

I suppose it's a pretty trivial question but nevertheless, I'm looking for the (sacct I guess) command that will display the CPU time and memory used by a slurm job ID.
user1701545
  • 4,770
  • 12
  • 38
  • 72
51
votes
2 answers

What does the --ntasks or -n tasks does in SLURM?

I was using SLURM to use some computing cluster and it had the -ntasks or -n. I have obviously read the documentation for it (http://slurm.schedmd.com/sbatch.html): sbatch does not launch tasks, it requests an allocation of resources and submits…
Charlie Parker
  • 13,522
  • 35
  • 118
  • 206
42
votes
6 answers

Pass command line arguments via sbatch

Suppose that I have the following simple bash script which I want to submit to a batch server through SLURM: #!/bin/bash #SBATCH -o "outFile"$1".txt" #SBATCH -e "errFile"$1".txt" hostname exit 0 In this script, I simply want to write the output…
Jason
  • 1,568
  • 2
  • 18
  • 28
38
votes
1 answer

What does the state 'drain' mean?

When I use sinfo I see the following: $ sinfo PARTITION AVAIL TIMELIMIT NODES STATE NODELIST [...] RG3 up 28-00:00:0 1 drain rg3hpc4 [...] What does the state 'drain' mean?
Martin Thoma
  • 91,837
  • 114
  • 489
  • 768
32
votes
4 answers

How to "undrain" slurm nodes in drain state

Using sinfo it shows 3 nodes are in drain state, PARTITION AVAIL TIMELIMIT NODES STATE NODELIST all* up infinite 3 drain node[10,11,12] Which command line should I use to undrain such nodes?
elm
  • 18,533
  • 11
  • 59
  • 106
27
votes
2 answers

What does the status "CG" mean in SLURM?

On a SLURM cluster one can use squeue to get information about jobs on the system. I know that "R" means running; and "PD" meaning pending, but what is "CG"? I understand it to be "canceling" or "failing" from experience, but does "CG" apply when a…
khaverim
  • 2,828
  • 5
  • 30
  • 43
26
votes
1 answer

Use slurm job id

When I launch a computation on the cluster, I usually have a separate program doing the post-processing at the end : sbatch simulation sbatch --dependency=afterok:JOBIDHERE postprocessing I want to avoid mistyping and automatically have the good…
user1824346
  • 424
  • 1
  • 5
  • 15
25
votes
1 answer

HPC cluster: select the number of CPUs and threads in SLURM sbatch

The terminology used in the sbatch man page might be a bit confusing. Thus, I want to be sure I am getting the options set right. Suppose I have a task to run on a single node with N threads. Am I correct to assume that I would use --nodes=1 and…
Tanash
  • 281
  • 1
  • 3
  • 7
25
votes
1 answer

Expand columns to see full jobname in Slurm

Is it possible to expand the number of characters used in the JobName column of the command sacct in SLURM? For example, I currently have: JobID JobName Elapsed NCPUS NTasks State ------------ ---------- ----------…
br19
  • 371
  • 1
  • 5
  • 11
25
votes
3 answers

How to submit a job to any [subset] of nodes from nodelist in SLURM?

I have a couple of thousand jobs to run on a SLURM cluster with 16 nodes. These jobs should run only on a subset of the available nodes of size 7. Some of the tasks are parallelized, hence use all the CPU power of a single node while others are…
Faber
  • 1,268
  • 2
  • 12
  • 19
23
votes
1 answer

How do the terms "job", "task", and "step" relate to each other?

How do the terms "job", "task", and "step" as used in the SLURM docs relate to each other? AFAICT, a job may consist of multiple tasks, and also it make consist of multiple steps, but, assuming this is true, it's still not clear to me how tasks and…
kjo
  • 27,601
  • 42
  • 124
  • 225
23
votes
2 answers

SLURM: see how many cores per node, and how many cores per job

I have searched google and read the documentation. My local cluster is using SLURM. I want to check the following things: How many cores does each node have? How many cores has each job in the queue reserved? Any advice would be much appreciated!
Parsa
  • 2,485
  • 2
  • 14
  • 30
23
votes
4 answers

How do I save print statements when running a program in SLURM?

I am running a Python code that contains print statements via SLURM. Normally when I run the Python code directly via "python program.py" the print statements appear in the terminal. When I run my program via SLURM, as expected the print…
Ian
  • 385
  • 2
  • 10
1
2 3
76 77