summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorajw1980 <ajw1980@gmail.com>2019-03-26 15:23:17 -0500
committerPeter Scheibel <scheibel1@llnl.gov>2019-03-26 15:23:17 -0500
commite5b86c5527c458df7434c499842d659dd086b7f8 (patch)
tree5cdf11ed08680f612ee53778bfe7aa0f90f7aece /lib
parent7a4712b90a34a0234acc650b1e0ff7a1f42356eb (diff)
downloadspack-e5b86c5527c458df7434c499842d659dd086b7f8.tar.gz
spack-e5b86c5527c458df7434c499842d659dd086b7f8.tar.bz2
spack-e5b86c5527c458df7434c499842d659dd086b7f8.tar.xz
spack-e5b86c5527c458df7434c499842d659dd086b7f8.zip
Retrieve environment-modules prefix based on architecture (#10975)
When multiple instances of environment-modules were installed with different architectures, Spack was not retrieving the installation appropriate for the current architecture when finding the module prefix.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index a5b0358c56..47d0e65283 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -584,7 +584,8 @@ def print_setup_info(*info):
# print environment module system if available. This can be expensive
# on clusters, so skip it if not needed.
if 'modules' in info:
- specs = spack.store.db.query('environment-modules')
+ specs = spack.store.db.query(
+ 'environment-modules arch=%s' % spack.architecture.sys_type())
if specs:
shell_set('_sp_module_prefix', specs[-1].prefix)
else: