Ignore provider weights for runtimes

Runtimes are inherently tied to the associated compilers,
and choices among runtimes should be delegated to the compiler
prioritization criteria not the provider weights. This fixes
a bug causing concretization to mix compilers more than necessary
to avoid using the runtime associated with the compiler specified
for the root. E.g. `foo%oneapi` building dependencies with `%gcc`
to minimize edges on which `intel-oneapi-runtime` provides
`fortran-rt`.

Signed-off-by: Gregory Becker <becker33@llnl.gov>
This commit is contained in:
Gregory Becker 2025-03-24 18:07:59 -07:00
parent ca977ea9e1
commit 675a182f14

View File

@ -1682,10 +1682,11 @@ opt_criterion(45, "preferred providers (non-roots)").
#minimize{ 0@245: #true }.
#minimize{ 0@45: #true }.
#minimize{
Weight@45+Priority,ProviderNode,Virtual
: provider_weight(ProviderNode, Virtual, Weight),
not attr("root", ProviderNode),
build_priority(ProviderNode, Priority)
Weight@45+Priority,X,Provider,Virtual
: provider_weight(node(X, Provider), Virtual, Weight),
not attr("root", node(X, Provider)),
build_priority(node(X, Provider), Priority),
not runtime(Provider)
}.
% Try to minimize the number of compiler mismatches in the DAG.