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

slurm: add -C to restrict hostlist to nodes with specified features #126

Merged
merged 3 commits into from
Nov 14, 2020

Conversation

dylex
Copy link
Contributor

@dylex dylex commented Nov 10, 2020

Like srun -C, this takes the produced hostlist and filters it to only SLURM nodes that have one of the specified features. This is useful for us in combination with -P, but certainly open to other ideas. One could imagine other slurm node filters as well, of course. Does not accept the full slurm constraint syntax of A&B|C stuff, just a comma list that's essentially OR-d.

Restrict existing hostlist to nodes with one of the given features (like
srun -C)
@grondo
Copy link
Member

grondo commented Nov 10, 2020

Neat! I was going to suggest adding a test to tests/t1003-slurm.sh but I guess it would be difficult since you can't guarantee that any Slurm nodes will have any features to test.

@dylex
Copy link
Contributor Author

dylex commented Nov 10, 2020

I added one silly option for a test. It should be possible to collect features with sinfo -ho %b but you'd have to do a bit of work to figure out which to use and what the results should be (if any). I can look into that if it's useful.

@grondo
Copy link
Member

grondo commented Nov 11, 2020

That test works for me as a sanity check, no need to go any further at this time.

@grondo grondo merged commit 7e3335c into chaos:master Nov 14, 2020
@grondo
Copy link
Member

grondo commented Nov 14, 2020

Looks good to me! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants