diff --git a/reframe/core/modules.py b/reframe/core/modules.py index 35460e1695..df09860c99 100644 --- a/reframe/core/modules.py +++ b/reframe/core/modules.py @@ -575,6 +575,11 @@ 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') + class NoModImpl(ModulesSystemImpl): """A convenience class that implements a no-op a modules system."""