Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto define slurmd memory and CPU configuration #27

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions image/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ then
done
echo "-- slurmctld is now active ..."

echo "---> Updating node definitions ..."
scontrol delete node=${POD_NAME}
scontrol create NodeName=${POD_NAME} $(slurmd -C | head -n1 | cut -d ' ' -f 2-) State=FUTURE

echo "---> Starting the Slurm Node Daemon (slurmd) ..."
exec /usr/sbin/slurmd -D "${@:2}"

Expand Down
3 changes: 2 additions & 1 deletion slurm-cluster-chart/files/slurm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ CommunicationParameters=NoAddrCache

# NODES
MaxNodeCount=10
NodeName=slurmd-[0-9] State=FUTURE CPUs=4
NodeName=slurmd-[0-9] State=FUTURE
TreeWidth=65533
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this should be in main anyway, although with only 2x nodes it doesn't seem to make a difference: See https://slurm.schedmd.com/dynamic_nodes.html#config


# PARTITIONS
PartitionName=all Default=yes Nodes=ALL
Expand Down
2 changes: 1 addition & 1 deletion slurm-cluster-chart/templates/slurmd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
name: slurmd
ports:
- containerPort: 6818
hostPort: 6818
hostPort: 6818 # used to ensure only a single pod per k8s node
resources: {}
volumeMounts:
- mountPath: /etc/slurm/
Expand Down
6 changes: 3 additions & 3 deletions slurm-cluster-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
slurmImage: ghcr.io/stackhpc/slurm-docker-cluster:d3daba4
slurmImage: ghcr.io/stackhpc/slurm-docker-cluster:23aecda

login:
# Deployment resource name
Expand All @@ -7,8 +7,8 @@ login:

slurmd:
# StatefulSet resource name
name: slurmd # NB this must match NodeName= in slurm-cluster-chart/files/slurm.conf
replicas: 2
name: slurmd # NB must match prefix of NodeName= definition in slurm-cluster-chart/files/slurm.conf
replicas: 2 # NB must be <= number of nodes in NodeName= definition in slurm-cluster-chart/files/slurm.conf

slurmctld:
# StatefulSet resource name
Expand Down