summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Melara <maamelara@gmail.com>2016-05-20 15:48:13 -0700
committerMario Melara <maamelara@gmail.com>2016-05-20 15:48:13 -0700
commitc3767d593d04f990b4344540c95e07f172d54c42 (patch)
tree1a1e51b0dbb2a253f9a164854ee6ac6b537f6108
parent175a042fd332c13200fb30f7f834541c3bbaa6c4 (diff)
downloadspack-c3767d593d04f990b4344540c95e07f172d54c42.tar.gz
spack-c3767d593d04f990b4344540c95e07f172d54c42.tar.bz2
spack-c3767d593d04f990b4344540c95e07f172d54c42.tar.xz
spack-c3767d593d04f990b4344540c95e07f172d54c42.zip
compiler list is sorted in descending order, in order to get most up to date version we check from the beginning of the list
-rw-r--r--lib/spack/spack/concretize.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index f38afd38dc..1c451296c6 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -302,10 +302,10 @@ class DefaultConcretizer(object):
raise UnavailableCompilerVersionError(other_compiler)
# copy concrete version into other_compiler
- index = len(matches)-1
+ index = 0
while not _proper_compiler_style(matches[index], spec.architecture):
- index -= 1
- if index == 0:
+ index += 1
+ if index == len(matches) - 1:
raise NoValidVersionError(spec)
spec.compiler = matches[index].copy()
assert(spec.compiler.concrete)