SLURM in your workstation

Turn your workstation into a mini-grid (with Slurm). Based in https://thehatteronline.com

  • Install the slurm package:

in terminal

sudo apt-get install slurm-llnl
  • Install munge software, also available in the repository:

Important package

sudo apt-get install munge
  • Generate the configuration file

The installation comes with a couple of HTML pages allowing to generate the configuration file. They can be found at:

/usr/share/doc/slurm-llnl/slurm-llnl-configurator.easy.html
/usr/share/doc/slurm-llnl/slurm-llnl-configurator.html

Just open one of them in your webbrowser, and start to fill in the required fields. Default options are provided. To get information about your particular machine, you can run

  • Get the configuration file with:

-C

slurmd -C

This should come handy for the last part of the option file. Then save the resulting file in

/etc/slurm-llnl/slurm.conf

This is a example of the slurm.conf file for a computer with 8 cores in one node:

ControlMachine=COMPUTER
MpiDefault=none
ProctrackType=proctrack/pgid
ReturnToService=1
SlurmctldPidFile=/var/run/slurm-llnl/slurmctld.pid
SlurmdPidFile=/var/run/slurm-llnl/slurmd.pid
SlurmdSpoolDir=/var/lib/slurm-llnl/slurmd
SlurmUser=slurm
StateSaveLocation=/var/lib/slurm-llnl/slurmctld
SwitchType=switch/none
TaskPlugin=task/none
FastSchedule=1
FirstJobId=1
MaxJobId=10000
SchedulerType=sched/backfill
SelectType=select/cons_res
AccountingStorageType=accounting_storage/none
ClusterName=cluster
JobAcctGatherType=jobacct_gather/none
SlurmctldLogFile=/var/log/slurm-llnl/slurmctld.log
SlurmdLogFile=/var/log/slurm-llnl/slurmd.log

NodeName=COMPUTER CPUs=8 State=UNKNOWN
PartitionName=ASDF Nodes=COMPUTER Default=YES MaxTime=INFINITE State=UP
  • Generate the munge key with the command

Important step

sudo /usr/sbin/create-munge-key

For some reason, a permission change is needed to avoid some later warnings:

sudo chmod g-w /var/log
sudo chmod g-w /var/log/munge
  • Start the services with the commands: Useful

    ::::bash /etc/init.d/slurm-llnl start /etc/init.d/munge start

If fails, restart with:

/etc/init.d/slurm-llnl startclean
comments powered by Disqus