reframe-hpc / reframe

A powerful Python framework for writing and running portable regression tests and benchmarks for HPC systems.
https://reframe-hpc.readthedocs.org
BSD 3-Clause "New" or "Revised" License
224 stars 104 forks source link

[bugfix] Let Slurm decide partition in flexible node allocation if no default partition is defined #3280

Closed dmargala closed 1 month ago

dmargala commented 1 month ago

This PR fixes an issue with flexible node allocations when no partition is specified and there is no default partition in slurm.

At NERSC, users specify a qos rather than a partition and Slurm chooses a partition for a job based on the combination of several options. A sys admin at our site suggested using srun --test-only to see which partition Slurm would chose for a job with a given set of options.

pep8speaks commented 1 month ago

Hello @dmargala, Thank you for updating!

Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide

Comment last updated at 2024-10-09 15:36:44 UTC
dmargala commented 1 month ago

I considered replacing _get_default_partition() entirely with _get_actual_partition(options) but figured falling back at least preserves current behavior for sites that do have a default partition specified. The latter seems like it should handle the case where a default partition is specified and also allow the set of options to override that.