Comments (8)
Bisected to 89fc9a9, which just adds new versions and deps, not immediately useful.
That was indeed the trigger in this case, cause it caused the old version of
vtk
and the old version oflcov
to have both a penalty of2
.@jcortial-safran Thank you very much for the reproducer, that was super helpful. Can you confirm that this:
diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 60165338c6..4d8a202ce3 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1432,11 +1432,11 @@ opt_criterion(73, "deprecated versions used"). % 1. Version weight % 2. Number of variants with a non default value, if not set % for the root package. -opt_criterion(70, "version weight"). +opt_criterion(70, "version badness (roots)"). #minimize{ 0@270: #true }. #minimize{ 0@70: #true }. #minimize { - Weight@70+Priority + Weight@70+Priority,PackageNode : attr("root", PackageNode), version_weight(PackageNode, Weight), build_priority(PackageNode, Priority) @@ -1526,13 +1526,14 @@ opt_criterion(30, "non-preferred OS's"). }. % Choose more recent versions for nodes -opt_criterion(25, "version badness"). +opt_criterion(25, "version badness (non roots)"). #minimize{ 0@225: #true }. #minimize{ 0@25: #true }. #minimize{ Weight@25+Priority,node(X, Package) : version_weight(node(X, Package), Weight), build_priority(node(X, Package), Priority), + not attr("root", node(X, Package)), not runtime(Package) }.solves the issue for you?
Thanks for your help !
Yes it solves the issue in the example. It also improves greatmy the concretized specs in my real case. However it seems that some suboptimal specs (not in the roots, but in a dependent package, namely py-cython
) remain even after your changes, I will try to exhibit a minimal example before I submit a new issue.
from spack.
Bisected to 89fc9a9, which just adds new versions and deps, not immediately useful.
edit: just removing version 2.0 from lcov is sufficient to have it pick up 1.16 on @1
.
from spack.
I can reproduce too. The optimization weights when @1.16
is forced say:
==> Best of 7 considered solutions.
==> Optimization Criteria:
Priority Criterion Installed ToBuild
1 number of packages to build (vs. reuse) - 0
2 number of nodes from the same package - 0
3 requirement weight 0 0
4 deprecated versions used 0 0
5 version weight 0 3
6 number of non-default variants (roots) 0 0
7 preferred providers for roots 0 0
8 default values of variants not being used (roots) 0 0
9 number of non-default variants (non-roots) 0 0
10 preferred providers (non-roots) 0 0
11 compiler mismatches that are not from CLI 0 0
12 compiler mismatches that are not from CLI 0 0
13 non-preferred OS's 0 0
14 version badness 0 15
15 default values of variants not being used (non-roots) 0 6
16 non-preferred compilers 0 0
17 target mismatches 0 0
18 non-preferred targets 0 0
19 compiler mismatches (runtimes) 0 0
20 version badness (runtimes) 0 0
21 non-preferred targets (runtimes) 0 0
22 edge wiring 12 0
versus this output when @1
is given:
==> Best of 8 considered solutions.
==> Optimization Criteria:
Priority Criterion Installed ToBuild
1 number of packages to build (vs. reuse) - 0
2 number of nodes from the same package - 0
3 requirement weight 0 0
4 deprecated versions used 0 0
5 version weight 0 2
6 number of non-default variants (roots) 0 0
7 preferred providers for roots 0 0
8 default values of variants not being used (roots) 0 0
9 number of non-default variants (non-roots) 0 0
10 preferred providers (non-roots) 0 0
11 compiler mismatches that are not from CLI 0 0
12 compiler mismatches that are not from CLI 0 0
13 non-preferred OS's 0 0
14 version badness 0 16
15 default values of variants not being used (non-roots) 0 6
16 non-preferred compilers 0 0
17 target mismatches 0 0
18 non-preferred targets 0 0
19 compiler mismatches (runtimes) 0 0
20 version badness (runtimes) 0 0
21 non-preferred targets (runtimes) 0 0
22 edge wiring 12 0
from spack.
Looking into it
from spack.
Wow, I found a trivial typo in the root optimisation weight that apparently has been there since ever. I'm submitting a bugfix, but this bug is kind of rare to hit, since there must be two sub-optimal versions used in the environment and they must have the same penalty score.
from spack.
Bisected to 89fc9a9, which just adds new versions and deps, not immediately useful.
That was indeed the trigger in this case, cause it caused the old version of vtk
and the old version of lcov
to have both a penalty of 2
.
@jcortial-safran Thank you very much for the reproducer, that was super helpful. Can you confirm that this:
diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp
index 60165338c6..4d8a202ce3 100644
--- a/lib/spack/spack/solver/concretize.lp
+++ b/lib/spack/spack/solver/concretize.lp
@@ -1432,11 +1432,11 @@ opt_criterion(73, "deprecated versions used").
% 1. Version weight
% 2. Number of variants with a non default value, if not set
% for the root package.
-opt_criterion(70, "version weight").
+opt_criterion(70, "version badness (roots)").
#minimize{ 0@270: #true }.
#minimize{ 0@70: #true }.
#minimize {
- Weight@70+Priority
+ Weight@70+Priority,PackageNode
: attr("root", PackageNode),
version_weight(PackageNode, Weight),
build_priority(PackageNode, Priority)
@@ -1526,13 +1526,14 @@ opt_criterion(30, "non-preferred OS's").
}.
% Choose more recent versions for nodes
-opt_criterion(25, "version badness").
+opt_criterion(25, "version badness (non roots)").
#minimize{ 0@225: #true }.
#minimize{ 0@25: #true }.
#minimize{
Weight@25+Priority,node(X, Package)
: version_weight(node(X, Package), Weight),
build_priority(node(X, Package), Priority),
+ not attr("root", node(X, Package)),
not runtime(Package)
}.
solves the issue for you?
from spack.
However it seems that some suboptimal specs (not in the roots, but in a dependent package, namely py-cython) remain even after your changes, I will try to exhibit a minimal example before I submit a new issue.
Note that cases like that might happen if giving a penalty to some nodes results in avoiding bigger penalties on other nodes.
from spack.
However it seems that some suboptimal specs (not in the roots, but in a dependent package, namely py-cython) remain even after your changes, I will try to exhibit a minimal example before I submit a new issue.
Note that cases like that might happen if giving a penalty to some nodes results in avoiding bigger penalties on other nodes.
Yes, I agree. I need to confirm that the solution is indeed suboptimal.
from spack.
Related Issues (20)
- Installation issue: gperftools when `build_system=cmake` HOT 9
- Avoid storing binary blobs as test files for sz compression HOT 4
- Installation issue: openmpi (Spack v0.21 & v0.22) with compiler [email protected] HOT 9
- Spec matrix: concretization failures when matrixing MPI dependency HOT 3
- Concretizer error for Python variant (+tkinter) HOT 2
- Installation issue: HIP package sets excessive environment variables in dependent package modulefiles
- cuda: `nvcc` is unable to find `-lcupti`
- Installation issue: [email protected]%[email protected]
- Installation issue: glibc iconv incomplete by default on fedora, needs libiconv HOT 11
- Environments: root specs are not always marked explicit HOT 5
- Add an option to shorten git.[commit] version in Spec.format() HOT 3
- Installation issue: `seacas 2022-10-14:2023-05-30` with `fmt@9` when `gcc` mixed with `apple-clang` HOT 5
- Installation issue: `vtk@9%gcc14` HOT 4
- Cannot use `config:shared_linking:bind:true` anymore HOT 1
- Cannot install musl HOT 2
- Installation issue: abinit HOT 1
- Installation issue: gh
- Installation issue: kentutils HOT 2
- Spec syntax: semantic for `%` and `^` for compiler as deps
- Installation issue: [email protected] +cuda ~rocm fails to build HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spack.