From d96ea5ba0075c63e8cd042337a1d99225b92b2d5 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 29 Mar 2016 12:20:11 -0500 Subject: add modules package and have setup script find it if built --- share/spack/setup-env.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'share') diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..529517ff83 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -176,3 +176,13 @@ _spack_pathadd PATH "${_sp_prefix%/}/bin" _sp_sys_type=$(spack-python -c 'print(spack.architecture.sys_type())') _spack_pathadd DK_NODE "${_sp_share_dir%/}/dotkit/$_sp_sys_type" _spack_pathadd MODULEPATH "${_sp_share_dir%/}/modules/$_sp_sys_type" + +# +# Use spack built modules package if available +# for system that does not have it +# + +_modules_install_path=$(command spack location -i modules) +if [ -n "$_modules_install_path" ] ; then + . $_modules_install_path/Modules/init/sh +fi -- cgit v1.2.3-70-g09d2