-
Notifications
You must be signed in to change notification settings - Fork 2.4k
solver: use penalties for variant values #51780
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
Conversation
|
This bugfix comes with a slight regression:
radiuss.develop.csv
|
|
Last comment here before Christmas break: I would still try to avoid the However, apparently we do not keep track of the order as defined in package.py but throw values into sets, meaning that the scope of this PR becomes larger. I think that's worth it, since merging this with For what it's worth, if someone else wants to review this PR in the meantime and has different opinions, that's fine. I'll catch up early January. |
b58d353 to
ae9a1dc
Compare
fixes spack#51112 On develop nodes in a DAG get a penalty of 1 when a variant value is not the default. This might lead to cases of non-determinism, due to having multiple optimal solutions. Here we give different penalties to different non-default values, thereby reducing the non-determinism in concretization. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This requires modifications to DinjointSetsOfValues to store the values in the order they are declared. A few unit tests have been modified to ensure we check the order is preserved. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
0497522 to
aea873e
Compare
…ction Fixes a bug introduced in spack#51780 Variants defined with a validator function can have: ``` pkg_fact(Package, variant_possible_value(VariantID, Value)) ``` that are not associated with a penalty and are not part of the variant definition. In this case set the penalty to a very high value to avoid selecting them accidentally. Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>

fixes #51112
On develop nodes in a DAG get a penalty of 1 when a variant value is not the default. This might lead to cases of non-determinism, due to having multiple optimal solutions.
Here we give different penalties to different non-default values, thereby reducing the non-determinism in concretization.