Custom Search

Add new comment

How to easily install Slurm from source in less than 10 minutes

In this post I'll show you how I installed Slurm in the $HOME of a production cluster. The vast majority of time was taken by the compilation, thus depending on your system this could take less time.

We'll assume that $HOME is:
echo $HOME
/home/siserte

and the frontend is:
hostname
nodeFrontend

Getting the code and set up


git clone git://github.com/SchedMD/slurm.git
cd slurm
./autogen.sh
./configure --prefix=$HOME/slurm-install --sysconfdir=$HOME/slurm-install/confdir
make -j8
make -j8 install

Preparing the configuration


mkdir $HOME/slurm-install/confdir
mkdir $HOME/slurm-install/var
openssl genrsa -out $HOME/slurm-install/confdir/slurm.key 1024
openssl rsa -in $HOME/slurm-install/confdir/slurm.key -pubout -out $HOME/slurm-install/confdir/slurm.cert
export PATH=$HOME/slurm-install/bin:$HOME/slurm-install/sbin:$PATH

Apart from that, to get the compute node information will be crucial to configure Slurm appropriately, hence:
slurmd -C
ClusterName=(null) NodeName=nodeFrontend CPUs=8 Boards=1 SocketsPerBoard=2 CoresPerSocket=4 ThreadsPerCore=1 RealMemory=16071 TmpDisk=8212 UpTime=25-10:03:14

We'll keep this output for configuring the compute node.

Notice that in this example the controller node and the compute node are the same host.

Configuration file

You can use this template in order to have Slurm running easily.
The fields in bold correspond to your own host name and of course, the paths will be different. However, with these changes your configuration file will be ready.

cat $HOME/slurm-install/confdir/slurm.conf

ClusterName=Cluster
ControlMachine=nodeFrontend
SlurmUser=siserte
SlurmdUser=siserte
AuthType=auth/none
CryptoType=crypto/openssl
JobCredentialPrivateKey = /home/siserte/slurm-install/confdir/slurm.key
JobCredentialPublicCertificate = /home/siserte/slurm-install/confdir/slurm.cert
SlurmctldDebug=3
SlurmdDebug=3

StateSaveLocation=/home/siserte/slurm-install/var
SlurmdSpoolDir=/home/siserte/slurm-install/var/slurmd.%n
SlurmctldPidFile=/home/siserte/slurm-install/var/slurmctld.pid
SlurmdPidFile=/home/siserte/slurm-install/var/slurmd.%n.pid

SchedulerType=sched/backfill
SelectType=select/cons_res
SelectTypeParameters=CR_CORE
TaskPlugin = task/none

AccountingStorageType=accounting_storage/none
JobCompType=jobcomp/none

FastSchedule=1
SlurmctldLogFile=/home/siserte/slurm-install/var/slurmctld.log
SlurmdLogFile=/home/siserte/slurm-install/var/slurmd.%n.log

NodeName=nodeFrontend CPUs=8 SocketsPerBoard=2 CoresPerSocket=4 ThreadsPerCore=1 RealMemory=16071 TmpDisk=8212

PartitionName=main Nodes=nodeFrontend Default=YES MaxTime=INFINITE State=UP

Starting the daemons and testing the system


slurmctld -c
slurmd -c
srun hostname

References

http://www.ibm.com/developerworks/library/l-slurm-utility/

EDITED
------------------------------------------------------------------------------

Install dependencies in Ubuntu

sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install libglib2.0-dev
sudo apt-get install libgtk2.0-dev

Front end mode

./configure --prefix=$HOME/slurm-install --sysconfdir=$HOME/slurm-install/confdir --enable-front-end --enable-debug
make -j16 > m.o; make -j16 install > m.o

Tags: