You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/running/slurm.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[](){#ref-slurm}
2
-
# SLURM
2
+
# Slurm
3
3
4
-
CSCS uses the [SLURM](https://slurm.schedmd.com/documentation.html) as its workload manager to efficiently schedule and manage jobs on Alps vClusters.
4
+
CSCS uses the [Slurm](https://slurm.schedmd.com/documentation.html) workload manager to efficiently schedule and manage jobs on Alps vClusters.
5
5
SLURM is an open-source, highly scalable job scheduler that allocates computing resources, queues user jobs, and optimizes workload distribution across the cluster.
6
6
It supports advanced scheduling policies, job dependencies, resource reservations, and accounting, making it well-suited for high-performance computing environments.
At CSCS, SLURM is configured to accommodate the diverse range of node types available in our HPC clusters. These nodes vary in architecture, including CPU-only nodes and nodes equipped with different types of GPUs. Because of this heterogeneity, SLURM must be tailored to ensure efficient resource allocation, job scheduling, and workload management specific to each node type.
36
+
At CSCS, Slurm is configured to accommodate the diverse range of node types available in our HPC clusters.
37
+
These nodes vary in architecture, including CPU-only nodes and nodes equipped with different types of GPUs.
38
+
Because of this heterogeneity, Slurm must be tailored to ensure efficient resource allocation, job scheduling, and workload management specific to each node type.
37
39
38
-
Each type of node has different resource constraints and capabilities, which SLURM takes into account when scheduling jobs. For example, CPU-only nodes may have configurations optimized for multi-threaded CPU workloads, while GPU nodes require additional parameters to allocate GPU resources efficiently. SLURM ensures that user jobs request and receive the appropriate resources while preventing conflicts or inefficient utilization.
40
+
Each type of node has different resource constraints and capabilities, which Slurm takes into account when scheduling jobs.
41
+
For example, CPU-only nodes may have configurations optimized for multi-threaded CPU workloads, while GPU nodes require additional parameters to allocate GPU resources efficiently.
42
+
Slurm ensures that user jobs request and receive the appropriate resources while preventing conflicts or inefficient utilization.
39
43
40
44
!!! example "How to check the partitions and number of nodes therein?"
41
45
You can check the size of the system by running the following command in the terminal:
@@ -51,24 +55,26 @@ Each type of node has different resource constraints and capabilities, which SLU
51
55
52
56
[](){#ref-slurm-partition-debug}
53
57
### Debug partition
54
-
The SLURM`debug` partition is useful for quick turnaround workflows. The partition has a short maximum time (timelimit can be seen with `sinfo -p debug`), and a low number of maximum nodes (the `MaxNodes` can be seen with `scontrol show partition=debug`).
58
+
The Slurm`debug` partition is useful for quick turnaround workflows. The partition has a short maximum time (timelimit can be seen with `sinfo -p debug`), and a low number of maximum nodes (the `MaxNodes` can be seen with `scontrol show partition=debug`).
55
59
56
60
[](){#ref-slurm-partition-normal}
57
61
### Normal partition
58
-
This is the default partition, and will be used when you do not explicitly set a partition. This is the correct choice for standard jobs. The maximum time is usually set to 24 hours (`sinfo -p normal` for timelimit), and the maximum nodes can be as much as nodes are available.
62
+
This is the default partition, and will be used when you do not explicitly set a partition.
63
+
This is the correct choice for standard jobs. The maximum time is usually set to 24 hours (`sinfo -p normal` for timelimit), and the maximum nodes can be as much as nodes are available.
59
64
60
-
The following sections will provide detailed guidance on how to use SLURM to request and manage CPU cores, memory, and GPUs in jobs. These instructions will help users optimize their workload execution and ensure efficient use of CSCS computing resources.
65
+
The following sections will provide detailed guidance on how to use Slurm to request and manage CPU cores, memory, and GPUs in jobs.
66
+
These instructions will help users optimize their workload execution and ensure efficient use of CSCS computing resources.
61
67
62
68
[](){#ref-slurm-gh200}
63
69
## NVIDIA GH200 GPU Nodes
64
70
65
-
The [GH200 nodes on Alps][ref-alps-gh200-node] have four GPUs per node, and SLURM job submissions must be configured appropriately to best make use of the resources.
71
+
The [GH200 nodes on Alps][ref-alps-gh200-node] have four GPUs per node, and Slurm job submissions must be configured appropriately to best make use of the resources.
66
72
Applications that can saturate the GPUs with a single process per GPU should generally prefer this mode.
67
-
[Configuring SLURM jobs to use a single GPU per rank][ref-slurm-gh200-single-rank-per-gpu] is also the most straightforward setup.
73
+
[Configuring Slurm jobs to use a single GPU per rank][ref-slurm-gh200-single-rank-per-gpu] is also the most straightforward setup.
68
74
Some applications perform badly with a single rank per GPU, and require use of [NVIDIA's Multi-Process Service (MPS)] to oversubscribe GPUs with multiple ranks per GPU.
69
75
70
-
The best SLURM configuration is application- and workload-specific, so it is worth testing which works best in your particular case.
71
-
See [Scientific Applications][ref-software-sciapps] for information about recommended application-specific SLURM configurations.
76
+
The best Slurm configuration is application- and workload-specific, so it is worth testing which works best in your particular case.
77
+
See [Scientific Applications][ref-software-sciapps] for information about recommended application-specific Slurm configurations.
72
78
73
79
!!! warning
74
80
The GH200 nodes have their GPUs configured in ["default" compute mode](https://docs.nvidia.com/deploy/mps/index.html#gpu-compute-modes).
@@ -84,7 +90,7 @@ See [Scientific Applications][ref-software-sciapps] for information about recomm
84
90
[](){#ref-slurm-gh200-single-rank-per-gpu}
85
91
### One rank per GPU
86
92
87
-
Configuring SLURM to use one GH200 GPU per rank is easiest done using the `--ntasks-per-node=4` and `--gpus-per-task=1`SLURM flags.
93
+
Configuring Slurm to use one GH200 GPU per rank is easiest done using the `--ntasks-per-node=4` and `--gpus-per-task=1`Slurm flags.
88
94
For advanced users, using `--gpus-per-task` is equivalent to setting `CUDA_VISIBLE_DEVICES` to `SLURM_LOCALID`, assuming the job is using four ranks per node.
89
95
The examples below launch jobs on two nodes with four ranks per node using `sbatch` and `srun`:
90
96
@@ -104,7 +110,7 @@ Omitting the `--gpus-per-task` results in `CUDA_VISIBLE_DEVICES` being unset, wh
104
110
### Multiple ranks per GPU
105
111
106
112
Using multiple ranks per GPU can improve performance e.g. of applications that don't generate enough work for a GPU using a single rank, or ones that scale badly to all 72 cores of the Grace CPU.
107
-
In these cases SLURM jobs must be configured to assign multiple ranks to a single GPU.
113
+
In these cases Slurm jobs must be configured to assign multiple ranks to a single GPU.
108
114
This is best done using [NVIDIA's Multi-Process Service (MPS)].
109
115
To use MPS, launch your application using the following wrapper script, which will start MPS on one rank per node and assign GPUs to ranks according to the CPU mask of a rank, ensuring the closest GPU is used:
110
116
@@ -167,8 +173,7 @@ The configuration that is optimal for your application may be different.
167
173
[](){#ref-slurm-amdcpu}
168
174
## AMD CPU
169
175
170
-
!!! todo
171
-
document how slurm is configured on AMD CPU nodes (e.g. eiger)
176
+
!!! todo "document how Slurm is configured on AMD CPU nodes (e.g. [eiger][ref-cluster-eiger])"
0 commit comments