From 44bc176d08797ba8f1a08e49778c5a1eb317c5c5 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Thu, 23 Jul 2020 13:20:03 -0700 Subject: [PATCH] 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 eaf8360c2c4..5f113eba0b7 100644 --- a/lib/spack/spack/operating_systems/cray_backend.py +++ b/lib/spack/spack/operating_systems/cray_backend.py @@ -97,6 +97,9 @@ def __str__(self): 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 9c8770c3680..c6d367e9a68 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -20,7 +20,7 @@ _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',