diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-07-20 11:11:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 11:11:56 -0700 |
commit | 79e066d53c2baa4bf84bdaa84502e7d282020c0f (patch) | |
tree | 1fbfd46f2efecbe265be313269ad9185b5ca2e20 | |
parent | 4434f482c08c90011ba489b65ce7f75be35fb5bb (diff) | |
parent | 106147716ac73180ce80e693ea276612d36b2215 (diff) | |
download | spack-79e066d53c2baa4bf84bdaa84502e7d282020c0f.tar.gz spack-79e066d53c2baa4bf84bdaa84502e7d282020c0f.tar.bz2 spack-79e066d53c2baa4bf84bdaa84502e7d282020c0f.tar.xz spack-79e066d53c2baa4bf84bdaa84502e7d282020c0f.zip |
Merge pull request #1315 from LLNL/improved-cray-detection
Improved cray detection
-rw-r--r-- | lib/spack/spack/platforms/cray_xc.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py index 0f6599ab30..e3c7761a94 100644 --- a/lib/spack/spack/platforms/cray_xc.py +++ b/lib/spack/spack/platforms/cray_xc.py @@ -4,6 +4,7 @@ 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 front_end = 'sandybridge' @@ -35,7 +36,7 @@ class CrayXc(Platform): self.add_target('ivybridge', Target('ivybridge', 'craype-ivybridge')) self.add_target('haswell', - Target('haswell','craype-haswell')) + Target('haswell', 'craype-haswell')) # Front end of the cray platform is a linux distro. linux_dist = LinuxDistro() @@ -45,10 +46,14 @@ class CrayXc(Platform): @classmethod def detect(self): - 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() + try: + cc_verbose = which('ftn') + text = cc_verbose('-craype-verbose', + output=str, error=str, + ignore_errors=True).split() if '-D__CRAYXC' in text: return True - return False + else: + return False + except: + return False |