summaryrefslogtreecommitdiff
path: root/abbenay
diff options
context:
space:
mode:
authorstuebinm2022-10-28 23:22:33 +0200
committerstuebinm2022-10-28 23:22:33 +0200
commit3ce201184fe88bc392ea4c6714dee16925be2e5f (patch)
treefeff32cbce77ef635050ec9cabdb8f2574f46029 /abbenay
parent2a8b1868ffa22c4ecfdb42acf8f4549c326c4f65 (diff)
add a slurm server for fun
Diffstat (limited to 'abbenay')
-rw-r--r--abbenay/configuration.nix1
-rw-r--r--abbenay/hpc.nix57
2 files changed, 58 insertions, 0 deletions
diff --git a/abbenay/configuration.nix b/abbenay/configuration.nix
index 0474c62..a5eca89 100644
--- a/abbenay/configuration.nix
+++ b/abbenay/configuration.nix
@@ -3,6 +3,7 @@
{
imports = [
./hardware-configuration.nix
+ ./hpc.nix
];
services.avahi.enable = true;
diff --git a/abbenay/hpc.nix b/abbenay/hpc.nix
new file mode 100644
index 0000000..c29d65c
--- /dev/null
+++ b/abbenay/hpc.nix
@@ -0,0 +1,57 @@
+{ config, lib, pkgs, ... }:
+
+{
+ services.munge = {
+ enable = true;
+ password = "/tmp/munge/key";
+ };
+
+ services.slurm = {
+ server.enable = true;
+ client.enable = true;
+
+ clusterName = "abbenay";
+
+
+ extraConfig = ''
+# slurm.conf file generated by configurator.html.
+# Put this file on all nodes of your cluster.
+# See the slurm.conf man page for more information.
+#
+SlurmctldHost=abbenay
+MpiDefault=none
+ReturnToService=1
+# SlurmctldPidFile=/var/run/slurmctld.pid
+# SlurmctldPort=6817
+# SlurmdPidFile=/var/run/slurmd.pid
+# SlurmdPort=6818
+# SlurmdSpoolDir=/var/spool/slurmd
+SwitchType=switch/none
+TaskPlugin=task/affinity
+
+# TIMERS
+InactiveLimit=0
+KillWait=30
+MinJobAge=300
+SlurmctldTimeout=120
+SlurmdTimeout=300
+Waittime=0
+
+# SCHEDULING
+SchedulerType=sched/backfill
+SelectType=select/cons_tres
+
+# LOGGING AND ACCOUNTING
+JobAcctGatherFrequency=30
+JobAcctGatherType=jobacct_gather/none
+SlurmctldDebug=info
+SlurmctldLogFile=/var/log/slurmctld.log
+SlurmdDebug=info
+SlurmdLogFile=/var/log/slurmd.log
+
+# COMPUTE NODES
+NodeName=abbenay CPUs=2 State=UNKNOWN
+PartitionName=debug Nodes=ALL Default=YES MaxTime=INFINITE State=UP
+'';
+ };
+}