To determine whether a Slurm node is a master (control) node or a compute node, you can use several methods depending on your access level and the information available on the node. Here are the most common approaches:
Slurm configuration files usually define the roles of nodes. You can inspect these files if you have access:
slurm.conf: This file lists all nodes and their roles.
bashgrep -E '^NodeName|^ControlMachine' /etc/slurm/slurm.conf
ControlMachine line specifies the master node.NodeName lines list all nodes, often with additional attributes like State=UNKNOWN or State=IDLE for compute nodes.If Slurm is running, you can use the following commands:
sinfo: Lists all nodes and their states.
bashsinfo -N
mixed or cloud if it also runs jobs, or it may not appear in the compute node list.scontrol show nodes: Shows detailed information about each node.
bashscontrol show nodes
NodeName and State fields. The master node may have a different state or additional flags.scontrol show config: Displays the Slurm configuration, including the master node.
bashscontrol show config | grep ControlMachine
master, headnode, or similar).
bashhostname
scontrol show config | grep ControlMachine.slurmctld (Slurm controller daemon).
bashps aux | grep slurm
slurmctld, you are on the master node.slurmd (Slurm node daemon).If you are unsure or lack permissions, the cluster administrator can confirm the role of the node.
Summary Table
grep -E '^NodeName|^ControlMachine' /etc/slurm/slurm.confControlMachine linesinfosinfo -Nscontrol show nodesscontrol show nodesscontrol show configscontrol show config | grep ControlMachineControlMachine valuehostnameControlMachineps aux | grep slurmslurmctld = master, slurmd = compute