SLURM: Difference between revisions

From CSCWiki
Jump to navigation Jump to search
Content deleted Content added
Start installation guide
 
mNo edit summary
Line 1: Line 1:
== Installation ==
== Installation/Config ==
First you need to install the "slurm" packages and dependencies so run<syntaxhighlight lang="bash" start="1">
First you need to install the "slurm" packages and dependencies so run<syntaxhighlight lang="bash" start="1">
sudo apt update
sudo apt update
sudo apt install slurm-wlm slurmd slurmctld munge -y
sudo apt install slurm-wlm slurmd slurmctld munge -y
</syntaxhighlight>Then you need to verify that there are MUNGE keys, which there should already be but run <nowiki><code lang="bash>sudo test -f /etc/munge/munge.key && echo "Key exists" || echo "Key is missing" </code></nowiki>
</syntaxhighlight>Then you need to verify that there are MUNGE keys, which there should already be but run the following to check<syntaxhighlight lang="bash">
sudo test -f /etc/munge/munge.key && echo "Key exists" || echo "Key is missing"
</syntaxhighlight>For this next part, you are going to need the systems hostname, CPU core count, and total RAM. Now create the file /etc/slurm/slurm.conf and write the following in it (replacing the temps with the mentioned data)<syntaxhighlight lang="bash" start="1" line="1">
ClusterName=localcluster
SlurmctldHost=<your-hostname>

# Authentication
AuthType=auth/munge
CredType=cred/munge

# Process tracking and resource limits
ProctrackType=proctrack/cgroup
TaskPlugin=task/cgroup,task/affinity
SelectTypeParameters=CR_Core_Memory

# Paths and logging
SlurmUser=slurm
StateSaveLocation=/var/lib/slurm/slurmctld
SlurmdSpoolDir=/var/lib/slurm/slurmd
SlurmctldPidFile=/run/slurmctld.pid
SlurmdPidFile=/run/slurmd.pid
SlurmctldLogFile=/var/log/slurmctld.log
SlurmdLogFile=/var/log/slurmd.log

# Node definition
NodeName=<your-hostname> CPUs=<CPU-cores> RealMemory=<Total-RAM> State=UNKNOWN

# Partition definition
PartitionName=debug Nodes=<your-hostname> Default=YES MaxTime=INFINITE State=UP
</syntaxhighlight>Also create the file /etc/slurm/cgroup.conf and write<syntaxhighlight lang="bash" line="1" start="1">
CgroupAutomount=yes
ConstrainCores=yes
ConstrainRAMSpace=yes
</syntaxhighlight>

Revision as of 04:25, 23 October 2026

Installation/Config

First you need to install the "slurm" packages and dependencies so run

sudo apt update
sudo apt install slurm-wlm slurmd slurmctld munge -y

Then you need to verify that there are MUNGE keys, which there should already be but run the following to check

sudo test -f /etc/munge/munge.key && echo "Key exists" || echo "Key is missing"

For this next part, you are going to need the systems hostname, CPU core count, and total RAM. Now create the file /etc/slurm/slurm.conf and write the following in it (replacing the temps with the mentioned data)

ClusterName=localcluster
SlurmctldHost=<your-hostname>

# Authentication
AuthType=auth/munge
CredType=cred/munge

# Process tracking and resource limits
ProctrackType=proctrack/cgroup
TaskPlugin=task/cgroup,task/affinity
SelectTypeParameters=CR_Core_Memory

# Paths and logging
SlurmUser=slurm
StateSaveLocation=/var/lib/slurm/slurmctld
SlurmdSpoolDir=/var/lib/slurm/slurmd
SlurmctldPidFile=/run/slurmctld.pid
SlurmdPidFile=/run/slurmd.pid
SlurmctldLogFile=/var/log/slurmctld.log
SlurmdLogFile=/var/log/slurmd.log

# Node definition
NodeName=<your-hostname> CPUs=<CPU-cores> RealMemory=<Total-RAM> State=UNKNOWN

# Partition definition
PartitionName=debug Nodes=<your-hostname> Default=YES MaxTime=INFINITE State=UP

Also create the file /etc/slurm/cgroup.conf and write

CgroupAutomount=yes
ConstrainCores=yes
ConstrainRAMSpace=yes