From 04295f6531ead1ffbbb12431adf975affc872962 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Thu, 2 Jan 2020 18:50:11 -0800 Subject: concretizer: optimized for preferred virtuals before recent versions --- lib/spack/spack/solver/asp.py | 2 +- lib/spack/spack/solver/concretize.lp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index 3b2761039e..969e1997df 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -541,7 +541,7 @@ class AspGenerator(object): for vspec in sorted(self.possible_virtuals): self.fact(fn.virtual(vspec)) for provider in sorted(spack.repo.path.providers_for(vspec)): - # TODO: handle versioned virtuals + # TODO: handle versioned and conditional virtuals self.fact(fn.provides_virtual(provider.name, vspec)) def generate_asp_program(self, specs): diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 0d8fe1c642..e2de60b887 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -210,11 +210,11 @@ root(D, 1) :- not root(D), node(D). % prefer default variants #minimize { N*R@5,P,V,X : variant_not_default(P, V, X, N), root(P, R) }. -% prefer more recent versions. -#minimize{ N@4,P,V : version_weight(P, V, N) }. - % pick most preferred virtual providers -#minimize{ N*R@3,D : provider_weight(D, N), root(P, R) }. +#minimize{ N*R@4,D : provider_weight(D, N), root(P, R) }. + +% prefer more recent versions. +#minimize{ N@3,P,V : version_weight(P, V, N) }. % compiler preferences #maximize{ N@2,P : compiler_match(P, N) }. -- cgit v1.2.3-70-g09d2