From 4fe3836be186e11658ed25ef3a8bcea5b725dfde Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 29 May 2018 11:21:55 +0200 Subject: [PATCH 1/2] use --force when purging all loaded modules with Lmod, to ensure sticky modules also get unloaded --- reframe/core/modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reframe/core/modules.py b/reframe/core/modules.py index 35460e1695..5c4c09d3da 100644 --- a/reframe/core/modules.py +++ b/reframe/core/modules.py @@ -575,6 +575,9 @@ def conflicted_modules(self, module): return ret + def unload_all(self): + self._exec_module_command('--force', 'purge') + class NoModImpl(ModulesSystemImpl): """A convenience class that implements a no-op a modules system.""" From e2b812dcc8e883e6f5bec624ae7a76728b3e88cb Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 7 Jun 2018 16:48:52 +0200 Subject: [PATCH 2/2] Add note about force purge in Lmod backend --- reframe/core/modules.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reframe/core/modules.py b/reframe/core/modules.py index 5c4c09d3da..df09860c99 100644 --- a/reframe/core/modules.py +++ b/reframe/core/modules.py @@ -576,6 +576,8 @@ def conflicted_modules(self, module): return ret def unload_all(self): + # Currently, we don't take any provision for sticky modules in Lmod, so + # we forcefully unload everything. self._exec_module_command('--force', 'purge')