From 4df58d84462347da3dd70c4af9c996cdb7efc534 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Fri, 13 Dec 2024 14:30:23 -0700 Subject: [PATCH] update docs on purge() module function --- README.new | 2 +- docs/source/050_lua_modulefiles.rst | 5 +++++ rt/purge/mf/Core/X/1.0.lua | 2 ++ rt/purge/purge.tdesc | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 rt/purge/mf/Core/X/1.0.lua diff --git a/README.new b/README.new index aacdc4790..067218d3c 100644 --- a/README.new +++ b/README.new @@ -195,5 +195,5 @@ Lmod 8.7+ * Removed MRC:__marged_hiddenT, MRC:__marged_forbiddenT and MRC:__mergedAlias2modT * Issue #731: Support for env. var. LMOD_SHOW_HIDDEN * Issue #739: Make tcl files have "spider" as mode matching when Lmod is in spider mode. - (8.7.55) * Patch #737: A better test for spaces in front of # + (8.7.55) * Patch #737: A better test for spaces in front of # for admin.list diff --git a/docs/source/050_lua_modulefiles.rst b/docs/source/050_lua_modulefiles.rst index 00da211ab..49b39db27 100644 --- a/docs/source/050_lua_modulefiles.rst +++ b/docs/source/050_lua_modulefiles.rst @@ -102,6 +102,11 @@ unset during unloading. of the modules. When unloading all modules are marked to be unloaded. +**purge** (): + This command will unload all (non-sticky) modules except the + current one. + + **try_load** ("pkgA", "pkgB", "pkgC"): load all modules. No errors reported if unable to load. Any other errors will be reported. diff --git a/rt/purge/mf/Core/X/1.0.lua b/rt/purge/mf/Core/X/1.0.lua new file mode 100644 index 000000000..e115ae07b --- /dev/null +++ b/rt/purge/mf/Core/X/1.0.lua @@ -0,0 +1,2 @@ +purge() +setenv("X","X") diff --git a/rt/purge/purge.tdesc b/rt/purge/purge.tdesc index f275c0084..d71b69adf 100644 --- a/rt/purge/purge.tdesc +++ b/rt/purge/purge.tdesc @@ -43,6 +43,10 @@ testdescript = { runLmod show tclpurge #15 runLmod load tclpurge #16 runLmod list #17 + runLmod load PrgEnv openmpi #18 + runLmod load X #19 + runLmod list #20 +