cray module do not work without CRAY_LD_LIBRARY_PATH (#17031)

Co-authored-by: Gregory Becker <becker33.llnl.gov>
This commit is contained in:
Greg Becker 2020-06-17 17:53:30 -05:00 committed by GitHub
parent c0cdc00409
commit 5b59e883c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -32,6 +32,7 @@
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:

View file

@ -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 []