diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-18 14:36:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 14:36:08 -0700 |
commit | 4a276807b1589661422d82840f6f0b3c4d775ed1 (patch) | |
tree | d96da4a9998d651697ff72f4c3578bae903e56ab /lib | |
parent | 51834773b4a014466cb7e5878117905eb5439d8b (diff) | |
parent | 46ee4a3a5360010e77f77f201ffd5e4289516cc4 (diff) | |
download | spack-4a276807b1589661422d82840f6f0b3c4d775ed1.tar.gz spack-4a276807b1589661422d82840f6f0b3c4d775ed1.tar.bz2 spack-4a276807b1589661422d82840f6f0b3c4d775ed1.tar.xz spack-4a276807b1589661422d82840f6f0b3c4d775ed1.zip |
Merge pull request #1245 from LLNL/features/cray-detection-improvement
The /cray_home directory is more consistent than the /cray/craype dir…
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/platforms/cray_xc.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index e710303e23..8dc575bb71 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -2,6 +2,7 @@ import os from spack.architecture import Platform, Target from spack.operating_systems.linux_distro import LinuxDistro from spack.operating_systems.cnl import Cnl +from spack.util.executable import which class CrayXc(Platform): priority = 20 @@ -42,5 +43,11 @@ class CrayXc(Platform): @classmethod def detect(self): - return os.path.exists('/opt/cray/craype') + if os.path.exists('/cray_home'): + cc_verbose = which('cc') + cc_verbose.add_default_arg('-craype-verbose') + text = cc_verbose(output=str, error=str, ignore_errors=True).split() + if '-D__CRAYXC' in text: + return True + return False |