Skip to content

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Nov 27, 2024

When converting the constraint expression to a Python one we replace hyphens in constraints and node features with _ and then evaluate the validity.

Ideally, we would need to properly support the Slurm constraint syntax, but that would an enhancements on its own.

Closes #3325.

@vkarak vkarak added this to the ReFrame 4.8 milestone Nov 27, 2024
@vkarak vkarak requested review from ekouts and teojgo November 27, 2024 13:45
@vkarak vkarak self-assigned this Nov 27, 2024
@vkarak vkarak requested a review from victorusu November 28, 2024 09:33
Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

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

lgmt. I wonder how we haven't caught this before. Should we also add unit tests?

@vkarak
Copy link
Contributor Author

vkarak commented Dec 6, 2024

I wonder how we haven't caught this before. Should we also add unit tests?

The problem is that we can't emulate the flexible allocation easily for a unit test. Generally our solution is suboptimal, since we don't recognize the full syntax of Slurm constraints. We simply provide a minimal meaningful subset, because I don't know if it makes sense to re-implement Slurm's node selection mechanism by constraints. Ideally, Slurm should be giving us a way to do the node selection outside submission.

@vkarak vkarak enabled auto-merge December 6, 2024 12:09
@vkarak vkarak merged commit ada1dfc into reframe-hpc:master Dec 6, 2024
38 checks passed
@vkarak vkarak deleted the bugfix/slurm-hyphen-constraints branch December 6, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment