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:
		@@ -584,7 +584,8 @@ def shell_set(var, value):
 | 
			
		||||
    # 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:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user