Possible tie-breaking of equivalent Clingo models #22242
Replies: 2 comments
-
This should not happen frequently, but it's possible that two models have the same cost and which one gets picked depend on the run. |
Beta Was this translation helpful? Give feedback.
-
@alalazo do you have any ideas about how we could eliminate that sort of nondeterminism? I should think that a couple more low-priority minimization criteria should be enough -- for variants, for example, we could have a secondary target to minimize the combined index of the non-default variants in a flattened list of nodes/variants. |
Beta Was this translation helpful? Give feedback.
-
Currently Spack's
PyClingoDriver
selects a model of minimum cost withmin
, but there does not appear to be any explicit logic that checks for multiple models of equivalent cost (in which casemin
will select the first, but I am not sure that Clingo will produce a list with the same order each time).Is it possible that this could lead to nondeterministic behavior where different concretizations could be chosen for a given spec?
Relevant snippet:
spack/lib/spack/spack/solver/asp.py
Line 361 in d0610f7
Tag: @becker33
Beta Was this translation helpful? Give feedback.
All reactions