diff options
author | Gregory Becker <becker33@llnl.gov> | 2016-01-05 14:47:14 -0800 |
---|---|---|
committer | Gregory Becker <becker33@llnl.gov> | 2016-01-05 14:47:14 -0800 |
commit | 751503c434bd249ed9f76b6ad353d2adcdcc3997 (patch) | |
tree | 339ade991b4c7c0a2937e57ea08d6896ba1ffc4d /lib | |
parent | 1edbaa4e62d2eb59b53cf6b10f7854d4edcf8497 (diff) | |
download | spack-751503c434bd249ed9f76b6ad353d2adcdcc3997.tar.gz spack-751503c434bd249ed9f76b6ad353d2adcdcc3997.tar.bz2 spack-751503c434bd249ed9f76b6ad353d2adcdcc3997.tar.xz spack-751503c434bd249ed9f76b6ad353d2adcdcc3997.zip |
fixed haswell targeting bug
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/architectures/cray.py | 17 | ||||
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 1 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lib/spack/spack/architectures/cray.py b/lib/spack/spack/architectures/cray.py index 47ede30145..dac3943fb7 100644 --- a/lib/spack/spack/architectures/cray.py +++ b/lib/spack/spack/architectures/cray.py @@ -17,15 +17,22 @@ class Cray(Architecture): # Handle the default here so we can check for a key error if 'CRAY_CPU_TARGET' in os.environ: - default = os.environ['CRAY_CPU_TARGET'] + self.default = os.environ['CRAY_CPU_TARGET'] + + # Change the defaults to haswell if we're on an XC40 + if self.default == 'haswell': + self.front_end = self.default + self.back_end = self.default - # Back End compiler needs the proper target module loaded. - self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) - self.add_target(self.default, Target(self.default,'craype-' + self.default)) # Could switch to use modules and fe targets for front end # Currently using compilers by path for front end. self.add_target(self.front_end, Target(self.front_end)) - + # Back End compiler needs the proper target module loaded. + self.add_target(self.back_end, Target(self.front_end,'craype-'+ self.back_end)) + self.add_target(self.default, Target(self.default,'craype-' + self.default)) + # This is kludgy and the order matters when the targets are all haswell + # This is because the last one overwrites the others when they have the + # same name. @classmethod def detect(self): diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 87106282cf..21a41f38ea 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -206,6 +206,7 @@ def compilers_for_spec(compiler_spec): return cls(cspec, compiler_paths, mods) matches = find(compiler_spec) + print matches, 'matches' return [get_compiler(cspec) for cspec in matches] |