diff options
author | Greg Becker <becker33@llnl.gov> | 2020-06-17 17:53:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 15:53:30 -0700 |
commit | 5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e (patch) | |
tree | ef7cd328ba21487582e7a79fcade5f20482a521f /lib | |
parent | c0cdc004091ffe5bf310ca69e7b9f3b1f1c008d0 (diff) | |
download | spack-5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e.tar.gz spack-5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e.tar.bz2 spack-5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e.tar.xz spack-5b59e883c1bb30b5893bb6bd3d6ea6be2e3c294e.zip |
cray module do not work without CRAY_LD_LIBRARY_PATH (#17031)
Co-authored-by: Gregory Becker <becker33.llnl.gov>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/build_environment.py | 12 | ||||
-rw-r--r-- | lib/spack/spack/util/module_cmd.py | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index 435de8594e..f997110b4c 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -32,6 +32,7 @@ There are two parts to the build environment: Skimming this module is a nice way to get acquainted with the types of calls you can make from within the install() function. """ +import re import inspect import multiprocessing import os @@ -148,11 +149,14 @@ def clean_environment(): env.unset('DYLD_LIBRARY_PATH') env.unset('DYLD_FALLBACK_LIBRARY_PATH') - # On Cray systems newer than CNL5, unset CRAY_LD_LIBRARY_PATH to avoid - # interference with Spack dependencies. CNL5 (e.g. Blue Waters) requires - # these variables to be set. + # On Cray "cluster" systems, unset CRAY_LD_LIBRARY_PATH to avoid + # interference with Spack dependencies. + # CNL requires these variables to be set (or at least some of them, + # depending on the CNL version). hostarch = arch.Arch(arch.platform(), 'default_os', 'default_target') - if str(hostarch.platform) == 'cray' and str(hostarch.os) != 'cnl5': + on_cray = str(hostarch.platform) == 'cray' + using_cnl = re.match(r'cnl\d+', str(hostarch.os)) + if on_cray and not using_cnl: env.unset('CRAY_LD_LIBRARY_PATH') for varname in os.environ.keys(): if 'PKGCONF' in varname: diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index a5ebe73c84..7017b2ecb6 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -127,7 +127,7 @@ def get_path_args_from_module_line(line): # OPERATION VAR_NAME PATH_ARG words = line.split() if len(words) > 2: - path_arg = line.split()[2] + path_arg = words[2] else: return [] |