From e5b86c5527c458df7434c499842d659dd086b7f8 Mon Sep 17 00:00:00 2001 From: ajw1980 Date: Tue, 26 Mar 2019 15:23:17 -0500 Subject: 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. --- lib/spack/spack/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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: -- cgit v1.2.3-70-g09d2