Closed
Conversation
334805d to
0abc891
Compare
sjpb
commented
Aug 16, 2023
| MaxNodeCount=10 | ||
| NodeName=slurmd-[0-9] State=FUTURE CPUs=4 | ||
| NodeName=slurmd-[0-9] State=FUTURE | ||
| TreeWidth=65533 |
Collaborator
Author
There was a problem hiding this comment.
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
dca54a3 to
23aecda
Compare
Collaborator
Author
|
@sd109 I tested this; after a clean install ran a job ok, changed the slurmd args to |
This was referenced Aug 18, 2023
Collaborator
Author
|
Closed, as #35 appears to work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables the CPU and memory configuration of a node to be automatically defined on slurmd pod startup, rather than having to be modified in slurm.conf.
Some background
Non-cloud/non-autoscaling Slurm daemons can be started in two modes:
slurmd -F)slurmd -Z)Dynamic Normal nodes do not need to be defined before slurmd startup. They automatically pass their actual memory and CPU configuration to the slurmctld on startup. However, the slurm.conf SlurmctldParameters=cloud_reg_addrs setting cannot be used, which with stable pod hostnames (= slurmd NodeNames), if a pod update changes the IP for a particular pod/slurm node, means slurmctld loses communication as the IP does not get updated.
Dynamic Future nodes do need to be defined before slurmd startup (with
State=FUTURE), butcloud_reg_addrsworks. This is the approach used in both the currentmainbranch and this PR. In themainbranch, the nodes are defined in slurm.conf. However, the default node definition results in 1x CPU and 1x MB memory, meaning these must be manually adjusted in slurm.conf to match the k8s worker node configurations.This PR instead uses
scontrol create nodeto create slurm nodes dynamically on pod startup with the memory/cpu/etc config of the actual node. It was expected that this would mean noNodeName=definitions would be required in slurm.conf. However, it appearsslurmdsegfaults on startup in that configuration. Therefore, a default configuration is left in slurm.conf, and on pod startup the node definition is deleted and recreated with the actual pod configuration.Testing
This can be tested by launching a job which requires more than 1x cpu (in Slurm terms) per node, e.g. (on login node as rocky in
~):