Skip to main content

One Slurm cluster across the carnaval GPU VMs

Date: October 2026 · Status: built and verified 2026-10-19 (what runs); this page keeps the reasoning

Scope: turn the ten one-node Slurm clusters of gpu0–gpu9 (what runs) into one cluster, so an MPI job can span several machines. Asked for the MPI teaching: today srun -n 4 ./prog keeps every rank on the VM it was submitted from.

Decisions taken​

  • A controller outside the lab VMs — a new LXC srv-slurm on a carnaval node, in the 91 subnet, VMID 113 = 192.168.91.113 (the 100–119 persistent range, 110–112 and .115 being Kubernetes). The lab VMs are re-stamped every week; the scheduler must not be. Rejected: slurmctld on gpu0 (gone at each re-stamp, and a student saturating gpu0 starves the scheduler); an LXC on rumba (every daemon exchange would cross the router between 88 and 91).
  • One shared cluster, no island mode — every gpuN stamped on carnaval0–9 joins it. One queue, ten machines, is what students are told. gpu10 (carnaval10, Tesla T4, 128 GB) stays out and keeps the current one-node generator: the stamping script decides by node name.
  • Accounting from the start — slurmdbd + MariaDB on srv-slurm, so sacct works and fair-share arbitrates between students instead of first-come. Associations are derived from provisioning/keycloak/roster.csv (vpn-carnaval → account students or staff) by a sync script, the same way the VMs get their accounts.
  • Dynamic, configless nodes — a VM gets only the munge key and the controller's name at stamp time; slurmd starts with --conf-server srv-slurm (configless) and -Z (dynamic node) and registers itself with its real CPUs, memory and GPU. Nothing per VM lives on the controller, so a re-stamped gpu4 is a new node with the old name and no manual step. Both features exist in the nodes' Slurm 23.11.
  • Same Slurm version on both sides — the controller LXC is Ubuntu 24.04 (Slurm 23.11.4, PMIx 5.0.1), like the VMs. Debian 13 would bring 24.11 on the controller: allowed by Slurm's rule (controller newer than the nodes), but configless hands the controller's slurm.conf to 23.11 daemons, so one version avoids a class of surprises.
  • GPU stays local — gres/gpu:1 per node as today; a multi-node job gets one card per node it asks for. Nothing changes for the single-node GPU jobs that run now.
  • MPI over TCP on the 91 subnet — OpenMPI's btl_tcp_if_include pinned to that interface in openmpi-mca-params.conf, so ranks never try the NetBird or a stray interface. PMIx through srun across nodes needs nothing else.

What stays the same​

  • The image recipe (carnaval-slurm.sh --image), the packages and cgroup.conf device constraints; sbatch, srun, squeue, sinfo, scontrol from any VM.
  • The NAS homes, mounted identically on every VM with the same UIDs: a binary built in $HOME is visible on every node, which is the one prerequisite of a multi-node MPI job. /tmp is per node.
  • The weekly re-stamp and the disposability of the VMs.

Limits to tell students​

  • 1 GbE between the nodes: about 100 µs of MPI latency and ~110 MB/s between two machines. Good for decomposition, communication patterns and showing where scaling breaks; not a performance platform.
  • Per-job ceilings: MaxNodes=3 (a cap on machines, not on cores: within each node a job gets what it asks for and shares the rest), MaxTime=1-00:00:00, DefaultTime=01:00:00, DefCpuPerGPU=8. A job that asks for the ten nodes would wait for all of them and block everyone meanwhile; the cap keeps the course usable.
  • The controller is one LXC with no HA. If it is down, running jobs continue, nothing new is scheduled. Its storage is the node's fast-vm pool (local-lvm is disabled on the carnaval nodes and local has no room): a hang of that pool takes the scheduler with it, which is why it goes on one of the eight nodes that have never hung, carnaval0, and why the CT is backed up nightly to PBS (the slurmdbd database with it).

Steps​

  1. srv-slurm — LXC per the proxmox-guest skill: Ubuntu 24.04 template (pveam download, none is on the nodes yet), 2 cores / 2 GB / 8 GB on fast-vm of carnaval0, 192.168.91.113, DNS srv-slurm.isc3. munge (key generated here, copied to secretzone/), slurmctld, slurmdbd + MariaDB, ClusterName=carnaval, PriorityType=priority/multifactor with fair-share, the gpu partition over the dynamic nodes, MaxNodeCount=16. Script: provisioning/pve/carnaval-slurm-ctl.sh, idempotent, run from the operator machine.
  2. Join mode in the VM recipe — carnaval-slurm.sh gains a join path: when /etc/slurm/controller and the munge key are present, the first-boot unit writes no slurm.conf and starts slurmd --conf-server srv-slurm -Z --conf "Gres=gpu:1"; otherwise it generates the one-node cluster as today (gpu10). carnaval-lab-vm.sh injects both files through the cloud-init snippet for every node but carnaval10.
  3. Associations — provisioning/pve/carnaval-slurm-accounts.sh: sacctmgr adds the students and staff accounts and one association per rostered vpn-carnaval person; run after every roster change (hook it into the onboarding recipe) and idempotent.
  4. Template rebuild and re-stamp — carnaval-guests.sh --templates on one node, the dump to nas-library, restore on the others, then the ten VMs re-stamped (nobody logged in).
  5. Verification — sinfo shows ten nodes; an MPI ring over 2 then 4 nodes with srun -N; a --gres=gpu:1 job on each node; sacct lists them; a re-stamp of one VM re-registers it with no action on the controller.
  6. Documentation — the Slurm section becomes the cluster description, the student cheatsheet gains -N, this page's status line is updated.

Effort: about two days, step 1 and 2 being most of it.

What the build taught​

  • AccountingStorageEnforce=limits implies associations in Slurm: a person without one is refused ("Invalid account"), there is no softer setting short of no enforcement. Hence the sync in onboard.sh.
  • Slurm names a job's owner by UID through the controller's passwd, so the controller carries login-less users with the register's UIDs; added after the associations, the daemons had to be restarted once to pick the UIDs up (sacctmgr records the UID at add time when the user exists).
  • Clients on the nodes need AccountingStorageHost to be the controller's name, not localhost, or sacct fails on every node.
  • The lab-VM stamping script injects the current carnaval-slurm.sh and runs it at first boot, so the template did not have to be rebuilt for the switch.

Still open: whether gpu10 should be a submit host for the shared cluster (it is not a node).