Skip to content
Snippets Groups Projects
Commit a035fa11 authored by Gregory Becker's avatar Gregory Becker
Browse files

shasta PrgEnv module unloaded by unloading component

parent 64eb5522
No related branches found
No related tags found
No related merge requests found
......@@ -755,7 +755,8 @@ def setup_package(pkg, dirty):
# kludge to handle cray libsci being automatically loaded by PrgEnv
# modules on cray platform. Module unload does no damage when
# unnecessary
module('unload', 'cray-libsci')
if False:
module('unload', 'cray-libsci')
if pkg.architecture.target.module_name:
load_module(pkg.architecture.target.module_name)
......
......@@ -99,14 +99,17 @@ def load_module(mod):
# We do this without checking that they are already installed
# for ease of programming because unloading a module that is not
# loaded does nothing.
text = module('show', mod).split()
for i, word in enumerate(text):
if word == 'conflict':
module('unload', text[i + 1])
# Load the module now that there are no conflicts
# Some module systems use stdout and some use stderr
module('load', mod)
if 'PrgEnv' not in mod:
module('swap', mod)
else:
text = module('show', mod).split()
for i, word in enumerate(text):
if word == 'conflict':
module('unload', text[i + 1])
# Load the module now that there are no conflicts
# Some module systems use stdout and some use stderr
module('load', mod)
def get_path_args_from_module_line(line):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment