From d4e5f5b4943697e526705923bdb3c02510e65bac Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Mon, 13 Mar 2023 19:21:55 +0100 Subject: [PATCH] Use module try-load do get environnement from lmod modules try-load allows to have conflictual modules without failure. The last module will be loaded. --- bin/salomeContext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 865b17557..e3a916683 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -111,7 +111,7 @@ class SalomeContext: raise SalomeContextException("Module environment not present") return try: - out, err = subprocess.Popen([modulecmd, "python", "load"] + env_modules, stdout=subprocess.PIPE).communicate() + out, err = subprocess.Popen([modulecmd, "python", "try-load"] + env_modules, stdout=subprocess.PIPE).communicate() exec(out) # define specific environment variables except Exception: raise SalomeContextException("Failed to load env modules: %s ..." % ' '.join(env_modules)) -- 2.39.2