summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/platforms/cray_xc.py72
-rw-r--r--lib/spack/spack/test/architecture.py4
2 files changed, 2 insertions, 74 deletions
diff --git a/lib/spack/spack/platforms/cray_xc.py b/lib/spack/spack/platforms/cray_xc.py
deleted file mode 100644
index 03d0383cc5..0000000000
--- a/lib/spack/spack/platforms/cray_xc.py
+++ /dev/null
@@ -1,72 +0,0 @@
-import os
-import spack
-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
-from llnl.util.filesystem import join_path
-
-
-class CrayXc(Platform):
- priority = 20
- front_end = 'sandybridge'
- back_end = 'ivybridge'
- default = 'ivybridge'
-
- 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__('cray_xc')
-
- # Handle the default here so we can check for a key error
- if 'CRAY_CPU_TARGET' in os.environ:
- 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
-
- # Could switch to use modules and fe targets for front end
- # Currently using compilers by path for front end.
- self.add_target('sandybridge', Target('sandybridge'))
- self.add_target('ivybridge',
- Target('ivybridge', 'craype-ivybridge'))
- self.add_target('haswell',
- Target('haswell', 'craype-haswell'))
-
- # Front end of the cray platform is a linux distro.
- linux_dist = LinuxDistro()
- self.front_os = str(linux_dist)
- self.add_operating_system(str(linux_dist), linux_dist)
- self.add_operating_system('CNL10', Cnl())
-
- @classmethod
- def setup_platform_environment(self, pkg, env):
- """ Change the linker to default dynamic to be more
- similar to linux/standard linker behavior
- """
- env.set('CRAYPE_LINK_TYPE', 'dynamic')
- cray_wrapper_names = join_path(spack.build_env_path, 'cray')
- if os.path.isdir(cray_wrapper_names):
- env.prepend_path('PATH', cray_wrapper_names)
- env.prepend_path('SPACK_ENV_PATHS', cray_wrapper_names)
-
- @classmethod
- def detect(self):
- 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
- else:
- return False
- except:
- return False
diff --git a/lib/spack/spack/test/architecture.py b/lib/spack/spack/test/architecture.py
index 09bdb021af..42dd9f4c04 100644
--- a/lib/spack/spack/test/architecture.py
+++ b/lib/spack/spack/test/architecture.py
@@ -31,7 +31,7 @@ import platform as py_platform
import spack
import spack.architecture
from spack.spec import *
-from spack.platforms.cray_xc import CrayXc
+from spack.platforms.cray import Cray
from spack.platforms.linux import Linux
from spack.platforms.bgq import Bgq
from spack.platforms.darwin import Darwin
@@ -76,7 +76,7 @@ class ArchitectureTest(MockPackagesTest):
def test_platform(self):
output_platform_class = spack.architecture.platform()
if os.path.exists('/opt/cray/craype'):
- my_platform_class = CrayXc()
+ my_platform_class = Cray()
elif os.path.exists('/bgsys'):
my_platform_class = Bgq()
elif 'Linux' in py_platform.system():