From 9ebf4ef383c4ac5593abcbae0aaae2ee4f780fd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torbj=C3=B6rn=20L=C3=B6nnemark?= <tobbez@ryara.net>
Date: Tue, 17 Oct 2023 19:34:45 +0200
Subject: [PATCH] Add compute node weights in Slurm config

This ensures CPU-only jobs will be allocated CPU-only nodes as long as
idle CPU-only nodes are available.
---
 files/slurm.conf | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/files/slurm.conf b/files/slurm.conf
index db4013b..a6c408d 100644
--- a/files/slurm.conf
+++ b/files/slurm.conf
@@ -56,17 +56,19 @@ GresTypes=gpu,mic
 
 #
 # COMPUTE NODES
-NodeName=n1599 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=gpu:k20x:3 # K20 x 3
-NodeName=n1596 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:7120:1 # Xeon Phi SE10/7120
-NodeName=n1595 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:7120:1 # Xeon Phi SE10/7120 
-NodeName=n1593 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=gpu:k40:2  # K40 x 2
-NodeName=n1594 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:31s1:3 # Xeon Phi 31S1
-NodeName=n1585 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only 
-NodeName=n1586 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only
-NodeName=n1587 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only
-NodeName=n1588 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only
-NodeName=p[101-124] CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only
-NodeName=d[101-108] CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 # CPU-only
+NodeName=n1593 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=gpu:k40:2  Weight=100 # K40 x 2
+NodeName=n1599 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=gpu:k20x:3 Weight=90  # K20 x 3
+
+NodeName=n1596 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:7120:1 Weight=80  # Xeon Phi SE10/7120
+NodeName=n1595 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:7120:1 Weight=80  # Xeon Phi SE10/7120
+NodeName=n1594 CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=64222 Gres=mic:31s1:3 Weight=80  # Xeon Phi 31S1
+
+NodeName=n1585      CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
+NodeName=n1586      CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
+NodeName=n1587      CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
+NodeName=n1588      CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
+NodeName=p[101-124] CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
+NodeName=d[101-108] CPUs=16 Boards=1 SocketsPerBoard=2 CoresPerSocket=8 ThreadsPerCore=1 RealMemory=31968 Weight=10 # CPU-only
 
 # GPU/MIC Gres settings
 #NodeName=n1593             Weight=10 Feature=vtune,test-sjd,test-sjr Gres=gpu:k40:2
-- 
GitLab