Ubuntu Server 12.04 + Slurm 2.5.7 fatnodes

2013-06-18
#ubuntu #server #slurm #fatnode

SLURM (Simple Linux Utility for Resource Management) is a job scheduler and resource manager usually installed on supercomputers. For example, it runs on the Lomonosov supercomputer in MSU, Moscow, Russia.

Usually one physical or virtual computer (physical node) is one logical node in SLURM. If one physical node serves more than one logical node, it is called a «fat node». Fat nodes are needed in case you have a lot of memory on a physical node or several GPUs on it. Sometimes fat nodes are convenient.

The system is Ubuntu 12.04 Server x64. We need an additional configuration parameter, so SLURM will be built from sources.

§ Prerequisites

Munge for node authentication and build-essential for building from sources are needed:

1sudo apt-get install -y libmunge-dev munge build-essential

§ Building SLURM

Get, unpack, and cd into the slurm directory:

1wget https://www.schedmd.com/download/latest/slurm-2.5.7.tar.bz2
2tar xvf slurm-2.5.7.tar.bz2
3cd slurm-2.5.7/

Configure SLURM to enable fat nodes, make and install it:

1./configure --enable-multiple-slurmd
2make
3sudo make install

§ Configuring system

We need to add a user slurm and add them to a group with the same name:

1sudo adduser slurm
2sudo adduser slurm slurm

Create the munge key and start the munge daemon:

1sudo /usr/sbin/create-munge-key
2sudo service munge start

§ Configuring SLURM

Now create the configuration file /usr/local/etc/slurm.conf:

 1ClusterName=ubuntu #< change this to your hostname
 2ControlMachine=ubuntu #< change this to your host name
 3
 4SlurmUser=slurm
 5SlurmctldPort=6817
 6AuthType=auth/munge
 7
 8StateSaveLocation=/tmp
 9SlurmdSpoolDir=/tmp/slurmd%n/
10SwitchType=switch/none
11MpiDefault=none
12SlurmctldPidFile=/var/run/slurmctld.pid
13SlurmdPidFile=/var/run/slurmd%n.pid
14ProctrackType=proctrack/pgid
15CacheGroups=0
16ReturnToService=0
17
18# TIMERS
19SlurmctldTimeout=300
20SlurmdTimeout=300
21InactiveLimit=0
22MinJobAge=300
23KillWait=30
24Waittime=0
25
26# SCHEDULING
27SchedulerType=sched/backfill
28SelectType=select/linear
29FastSchedule=1
30
31# LOGGING
32SlurmctldDebug=3
33SlurmdDebug=3
34JobCompType=jobcomp/none
35
36# COMPUTE NODES
37# control node
38NodeName=ubuntu NodeAddr=127.0.0.1 Port=17000 State=UNKNOWN
39
40# each logical node is on the same physical node, so we need different ports for them
41# name node-[*] is arbitrary
42NodeName=node-0 NodeAddr=127.0.0.1 Port=17001 State=UNKNOWN
43NodeName=node-1 NodeAddr=127.0.0.1 Port=17002 State=UNKNOWN
44NodeName=node-2 NodeAddr=127.0.0.1 Port=17003 State=UNKNOWN
45NodeName=node-3 NodeAddr=127.0.0.1 Port=17004 State=UNKNOWN
46NodeName=node-4 NodeAddr=127.0.0.1 Port=17005 State=UNKNOWN
47
48# PARTITIONS
49# partition name is arbitrary
50PartitionName=cpu Nodes=node-[0-4] Default=YES MaxTime=INFINITE State=UP

§ Starting SLURM

Start SLURM control daemon:

1sudo slurmctld -c

Start SLURM daemons for each logical node:

1sudo slurmd -c -N node-0
2sudo slurmd -c -N node-1
3sudo slurmd -c -N node-2
4sudo slurmd -c -N node-3
5sudo slurmd -c -N node-4

Check if everything is alright:

1sinfo

You must see that nodes are ready for work:

1cpu*         up   infinite      5   idle node-[0-4]