Local SLURM cluster setup
For remote execution of operations on a cluster environment, signac uses the signac-flow interface which allows the users to keep track of submitted operations. If you don’t have access to High-Performance Computing (HPC) clusters then you can set up your local computer to work like a HPC cluster using the open-source SLURM Workload Manager software. To set up a local cluster enviroment with Ubuntu 18.04 and SLURM 19.05.5, follow the steps below.
- Perform
sudo apt update
. - Install
slurm-wlm
on your machine using the commandsudo apt install slurm-wlm
. This installs both the central management daemonslurmctld
and the compute node daemonslurmd
. For the purposes of this tutorial, we assume that only one computer is part of the cluster and it will be running both the management and the compute node services. - You can check the directories where the services are installed using
which slurmd
andwhich slurmctld
. - You can also check the installed version using the command
slurmd --version
. - Execute
dpkg -L slurmctld
and after that, locate and copy the path of the file namedslurm-wlm-configurator.html
. In my case it was/usr/share/doc/slurmctld/slurm-wlm-configurator.html
. Move to that directory by executingcd /usr/share/doc/slurmctld/
- Execute
python3 -m http.server
and open the local web server’s address in your browser. - The file
slurm-wlm-configurator.html
needs to have read permissions, which can be added withchmod +r slurm-wlm-configurator.html
. After providing the required permissions to that file, open it. - Fill in the text fields according to the requirements and click the
submit
button. Please note in theProcessTracking
section, there is an optionCgroup
(which stands for control groups). Control groups are a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. However, the control groups feature was not set up on the system I used. Instead, I had to selectLinuxProc
. - After submitting the form, a text file is generated.
Save that file to the path
/etc/slurm-llnl/slurm.config
. - You have successfully set up a local Slurm environment!
You can start using the service by executing the commands
sudo service slurmd start
andsudo service slurmctld start
. You can also usestop
,restart
, orstatus
in place ofstart
.