diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/build_environment.py | 24 | ||||
-rw-r--r-- | lib/spack/spack/platforms/cray.py | 6 |
2 files changed, 19 insertions, 11 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index f57ecd1e58..435de8594e 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -53,6 +53,7 @@ import spack.main import spack.paths import spack.schema.environment import spack.store +import spack.architecture as arch from spack.util.string import plural from spack.util.environment import ( env_flag, filter_system_paths, get_path, is_system_path, @@ -141,17 +142,21 @@ def clean_environment(): # can affect how some packages find libraries. We want to make # sure that builds never pull in unintended external dependencies. env.unset('LD_LIBRARY_PATH') - env.unset('CRAY_LD_LIBRARY_PATH') env.unset('LIBRARY_PATH') env.unset('CPATH') env.unset('LD_RUN_PATH') env.unset('DYLD_LIBRARY_PATH') env.unset('DYLD_FALLBACK_LIBRARY_PATH') - # Remove all pkgconfig stuff from craype - for varname in os.environ.keys(): - if 'PKGCONF' in varname: - env.unset(varname) + # 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. + hostarch = arch.Arch(arch.platform(), 'default_os', 'default_target') + if str(hostarch.platform) == 'cray' and str(hostarch.os) != 'cnl5': + env.unset('CRAY_LD_LIBRARY_PATH') + for varname in os.environ.keys(): + if 'PKGCONF' in varname: + env.unset(varname) build_lang = spack.config.get('config:build_language') if build_lang: @@ -355,10 +360,6 @@ def set_build_environment_variables(pkg, env, dirty): extra_rpaths = ':'.join(compiler.extra_rpaths) env.set('SPACK_COMPILER_EXTRA_RPATHS', extra_rpaths) - implicit_rpaths = compiler.implicit_rpaths() - if implicit_rpaths: - env.set('SPACK_COMPILER_IMPLICIT_RPATHS', ':'.join(implicit_rpaths)) - # Add bin directories from dependencies to the PATH for the build. for prefix in build_prefixes: for dirname in ['bin', 'bin64']: @@ -733,6 +734,11 @@ def setup_package(pkg, dirty): load_external_modules(pkg) + implicit_rpaths = pkg.compiler.implicit_rpaths() + if implicit_rpaths: + build_env.set('SPACK_COMPILER_IMPLICIT_RPATHS', + ':'.join(implicit_rpaths)) + # Make sure nothing's strange about the Spack environment. validate(build_env, tty.warn) build_env.apply_modifications() diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py index 2fccf2fe55..9c8770c368 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -22,7 +22,9 @@ _craype_name_to_target_name = { 'x86-naples': 'zen', 'x86-rome': 'zen', # Cheating because we have the wrong modules on rzcrayz 'x86-skylake': 'skylake_avx512', - 'mic-knl': 'mic_knl' + 'mic-knl': 'mic_knl', + 'interlagos': 'bulldozer', + 'abudhabi': 'piledriver', } @@ -176,7 +178,7 @@ class Cray(Platform): craype_default_path = '/opt/cray/pe/craype/default/modulefiles' if os.path.isdir(craype_default_path): return os.listdir(craype_default_path) - return None + return [] if getattr(self, '_craype_targets', None) is None: strategies = [ |