summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/concretize.py2
-rw-r--r--lib/spack/spack/platforms/cray_xc.py12
-rw-r--r--lib/spack/spack/platforms/linux.py8
-rw-r--r--lib/spack/spack/spec.py18
-rw-r--r--lib/spack/spack/test/spec_semantics.py1
5 files changed, 22 insertions, 19 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index e30cf329f1..5d9715feed 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -344,7 +344,7 @@ class DefaultConcretizer(object):
and flag in p.compiler_flags))
if not flag in spec.compiler_flags or \
not (sorted(spec.compiler_flags[flag]) >= sorted(nearest.compiler_flags[flag])):
- if flag in spec.compiler_flag:
+ if flag in spec.compiler_flags:
spec.compiler_flags[flag] = list(set(spec.compiler_flags[flag]) |
set(nearest.compiler_flags[flag]))
else:
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py
index 4843a47c62..e710303e23 100644
--- a/lib/spack/spack/platforms/cray_xc.py
+++ b/lib/spack/spack/platforms/cray_xc.py
@@ -9,16 +9,16 @@ class CrayXc(Platform):
back_end = 'ivybridge'
default = 'ivybridge'
- front_os = "SuSE"
- back_os = "CNL"
- default_os = "CNL"
+ front_os = "SuSE11"
+ back_os = "CNL10"
+ default_os = "CNL10"
def __init__(self):
''' Since cori doesn't have ivybridge as a front end it's better
if we use CRAY_CPU_TARGET as the default. This will ensure
that if we're on a XC-40 or XC-30 then we can detect the target
'''
- super(CrayXc, self).__init__('crayxc')
+ super(CrayXc, self).__init__('cray_xc')
# Handle the default here so we can check for a key error
if 'CRAY_CPU_TARGET' in os.environ:
@@ -37,8 +37,8 @@ class CrayXc(Platform):
self.add_target('haswell',
Target('haswell','craype-haswell'))
- self.add_operating_system('SuSE', LinuxDistro())
- self.add_operating_system('CNL', Cnl())
+ self.add_operating_system('SuSE11', LinuxDistro())
+ self.add_operating_system('CNL10', Cnl())
@classmethod
def detect(self):
diff --git a/lib/spack/spack/platforms/linux.py b/lib/spack/spack/platforms/linux.py
index 18050ac79e..ebe018812a 100644
--- a/lib/spack/spack/platforms/linux.py
+++ b/lib/spack/spack/platforms/linux.py
@@ -12,10 +12,10 @@ class Linux(Platform):
super(Linux, self).__init__('linux')
self.add_target(self.default, Target(self.default))
linux_dist = LinuxDistro()
- self.default_os = linux_dist.name
- self.front_os = linux_dist.name
- self.back_os = linux_dist.name
- self.add_operating_system(linux_dist.name, linux_dist)
+ self.default_os = str(linux_dist)
+ self.front_os = self.default_os
+ self.back_os = self.default._os
+ self.add_operating_system(str(linux_dist), linux_dist)
@classmethod
def detect(self):
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 5d82af4af6..58d76fd7a9 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -538,13 +538,17 @@ class Spec(object):
Known flags currently include "arch"
"""
valid_flags = FlagMap.valid_compiler_flags()
-# if name == 'arch' or name == 'architecture':
-# platform, op_sys, target = value.split('-')
-# print platform, op_sys, target, '+++++++'
-# self._set_platform(platform)
-# self._set_os(op_sys)
-# self._set_target(target)
- if name == 'platform':
+ if name == 'arch' or name == 'architecture':
+ platform, op_sys, target = value.split('-')
+ assert(self.architecture.platform is None)
+ assert(self.architecture.platform_os is None)
+ assert(self.architecture.target is None)
+ assert(self.architecture.os_string is None)
+ assert(self.architecture.target_string is None)
+ self._set_platform(platform)
+ self._set_os(op_sys)
+ self._set_target(target)
+ elif name == 'platform':
self._set_platform(value)
elif name == 'os' or name == 'operating_system':
if self.architecture.platform:
diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index aa99ad71ed..0b2111bfe8 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -402,7 +402,6 @@ class SpecSematicsTest(MockPackagesTest):
self.check_constrain_changed('libelf', '~debug')
self.check_constrain_changed('libelf', 'debug=2')
self.check_constrain_changed('libelf', 'cppflags="-O3"')
- self.check_constrain_changed('libelf', ' arch=bgqos_0')
platform = spack.architecture.sys_type()
self.check_constrain_changed('libelf', 'target='+platform.target('default_target').name)