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.
This commit is contained in:
parent
7a4712b90a
commit
e5b86c5527
1 changed files with 2 additions and 1 deletions
|
@ -584,7 +584,8 @@ def shell_set(var, value):
|
||||||
# print environment module system if available. This can be expensive
|
# print environment module system if available. This can be expensive
|
||||||
# on clusters, so skip it if not needed.
|
# on clusters, so skip it if not needed.
|
||||||
if 'modules' in info:
|
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:
|
if specs:
|
||||||
shell_set('_sp_module_prefix', specs[-1].prefix)
|
shell_set('_sp_module_prefix', specs[-1].prefix)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue