From 8306d70519d0426fca4862042219799dfcfe4f38 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 605c9cd16..41bbb9d0b 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