summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-01-02 18:50:11 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2020-11-17 10:04:13 -0800
commit04295f6531ead1ffbbb12431adf975affc872962 (patch)
treeab4a2f3b1f8194c77e20744dd2a3d03305eb4dec /lib
parentf365373a3d0f082a6b824814ee0d670006ae3980 (diff)
downloadspack-04295f6531ead1ffbbb12431adf975affc872962.tar.gz
spack-04295f6531ead1ffbbb12431adf975affc872962.tar.bz2
spack-04295f6531ead1ffbbb12431adf975affc872962.tar.xz
spack-04295f6531ead1ffbbb12431adf975affc872962.zip
concretizer: optimized for preferred virtuals before recent versions
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py2
-rw-r--r--lib/spack/spack/solver/concretize.lp8
2 files changed, 5 insertions, 5 deletions
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) }.