From ed8250e055ab5493393f56d4819efe04a4f8fc8f Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Thu, 23 Jul 2020 13:20:03 -0700 Subject: cray: detect shasta os properly (#17467) Fixes #17299 Cray Shasta systems appear to use an unmodified Sles or other Linux operating system on the backend (like Cray "Cluster" systems and unlike Cray "XC40" systems that use CNL). This updates the CNL version detection to properly note that this is the underlying OS instead of CNL and delegate to LinuxDistro. --- lib/spack/spack/operating_systems/cray_backend.py | 3 +++ lib/spack/spack/platforms/cray.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/operating_systems/cray_backend.py b/lib/spack/spack/operating_systems/cray_backend.py index eaf8360c2c..5f113eba0b 100644 --- a/lib/spack/spack/operating_systems/cray_backend.py +++ b/lib/spack/spack/operating_systems/cray_backend.py @@ -97,6 +97,9 @@ class CrayBackend(LinuxDistro): def _detect_crayos_version(cls): if os.path.isfile(_cle_release_file): release_attrs = read_cle_release_file() + if 'RELEASE' not in release_attrs: + # This Cray system uses a base OS not CLE/CNL + return None v = spack.version.Version(release_attrs['RELEASE']) return v[0] elif os.path.isfile(_clerelease_file): diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py index 9c8770c368..c6d367e9a6 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -20,7 +20,7 @@ from spack.util.module_cmd import module _craype_name_to_target_name = { 'x86-cascadelake': 'cascadelake', 'x86-naples': 'zen', - 'x86-rome': 'zen', # Cheating because we have the wrong modules on rzcrayz + 'x86-rome': 'zen2', 'x86-skylake': 'skylake_avx512', 'mic-knl': 'mic_knl', 'interlagos': 'bulldozer', -- cgit v1.2.3-70-g09d2