Skip to content

Commit

Permalink
Fix bug where mixing NV and NVV in the same module sn caused ml spide…
Browse files Browse the repository at this point in the history
…r to miss the NVV modules
  • Loading branch information
Robert McLay committed Jan 31, 2019
1 parent 0925066 commit f78f32e
Show file tree
Hide file tree
Showing 14 changed files with 198 additions and 76 deletions.
2 changes: 2 additions & 0 deletions README.new
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Lmod 7.8+
(7.8.14) Add Lmod version report to --trace output.
(7.8.15) issue #394: use mname = MName:new("load",mt:userName(sn)) to get loadable file
contrib/tracking_module_usage python scripts have been updated to support python2 and python3
(7.8.16) Fix bug where spider reported incorrect results when a site mixed NV and NVV together in a single module.

2 changes: 1 addition & 1 deletion rt/cc/cc.tdesc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ testdescript = {
]],
keywords = {testName },

active = true,
active = false,
testName = testName,
job_submit_method = "INTERACTIVE",

Expand Down
16 changes: 8 additions & 8 deletions rt/dyn/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
Modules based on Lua: Version 7.8.14 2019-01-14 13:30 -06:00
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
by Robert McLay [email protected]
===========================
step 2
Expand All @@ -13,24 +13,24 @@ step 3
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T load gcc fenics
===========================
running: module --regression_testing -T load gcc fenics
(1)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
(1)(0)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
Prepending: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 to MODULEPATH
Lmod is automatically replacing "intel/18.0.1" with "gcc/7.1".
(2)Unloading: intel (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/intel/18.0.1.lua)
(2)(0)Unloading: intel (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/intel/18.0.1.lua)
Removing: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0 from MODULEPATH
(3)Unloading: gcc (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua)
(3)(0)Unloading: gcc (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua)
Removing: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 from MODULEPATH
(4)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
(4)(0)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
Prepending: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 to MODULEPATH
Pushing fenics on moduleQ
reloadAll(1)(impi, gcc)
(5)Unloading: impi (status: active) (fn: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0/impi/18.0.1.lua)
(5)(1)Unloading: impi (status: active) (fn: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0/impi/18.0.1.lua)
Removing: ProjectDIR/rt/dyn/mf/MPI/intel/18.0/impi/18.0 from MODULEPATH
reloadAll(2)(gcc)
(6)Loading: impi (fn: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1/impi/18.0.1.lua, using Find-Best)
(6)(1)Loading: impi (fn: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1/impi/18.0.1.lua, using Find-Best)
Prepending: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0 to MODULEPATH
reloadAll(2)(gcc, impi)
(7)Loading: fenics (fn: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0/fenics/1.0.lua, using Find-Best)
(7)(0)Loading: fenics (fn: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0/fenics/1.0.lua, using Find-Best)
Due to MODULEPATH changes, the following have been reloaded:
1) impi/18.0.1
===========================
Expand Down
120 changes: 60 additions & 60 deletions rt/family/err.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions rt/rstats/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
Modules based on Lua: Version 7.8.12 2019-01-08 16:15 -06:00
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
by Robert McLay [email protected]
===========================
step 2
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T load Rpkgs
===========================
running: module --regression_testing -T load Rpkgs
(1)Loading: Rpkgs (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua, using Find-Best)
(2)Loading: Rstats/3.4.0 (fn: ProjectDIR/rt/rstats/mf/Core/Rstats/3.4.0.lua, using Find-Best)
(1)(0)Loading: Rpkgs (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua, using Find-Best)
(2)(0)Loading: Rstats/3.4.0 (fn: ProjectDIR/rt/rstats/mf/Core/Rstats/3.4.0.lua, using Find-Best)
===========================
step 3
lua ProjectDIR/src/lmod.in.lua bash --regression_testing list
Expand All @@ -22,4 +22,4 @@ step 4
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T unload Rpkgs
===========================
running: module --regression_testing -T unload Rpkgs
(1)Unloading: Rpkgs (status: active) (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua)
(1)(0)Unloading: Rpkgs (status: active) (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua)
30 changes: 30 additions & 0 deletions rt/spades/err.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
===========================
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
by Robert McLay [email protected]
===========================
step 2
lua ProjectDIR/src/lmod.in.lua bash --regression_testing avail
===========================
ProjectDIR/rt/spades/mf
spades/py27/3.13 spades/py36/3.13 spades/3.12 (D)
Where:
D: Default Module
Module defaults are chosen based on Find First Rules due to Name/Version/Version modules found in the module tree.
See https://lmod.readthedocs.io/en/latest/060_locating.html for details.
Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
===========================
step 3
lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider spades
===========================
spades:
Versions:
spades/py27/3.13
spades/py36/3.13
spades/3.12
For detailed information about a specific "spades" module (including how to load the modules) use the module's full name.
For example:
$ module spider spades/py36/3.13
Empty file added rt/spades/mf/spades/.version
Empty file.
3 changes: 3 additions & 0 deletions rt/spades/mf/spades/3.12.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pushenv("CONDA_DEFAULT_ENV","spades-3.12.0")
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.12.0/bin",priority=100}
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")
3 changes: 3 additions & 0 deletions rt/spades/mf/spades/py27/3.13.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pushenv("CONDA_DEFAULT_ENV","spades-3.13.0-py27")
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.13.0-py27/bin",priority=100}
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")
3 changes: 3 additions & 0 deletions rt/spades/mf/spades/py36/3.13.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pushenv("CONDA_DEFAULT_ENV","spades-3.13.0-py36")
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.13.0-py36/bin",priority=100}
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")
22 changes: 22 additions & 0 deletions rt/spades/out.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
===========================
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
===========================
step 2
lua ProjectDIR/src/lmod.in.lua bash --regression_testing avail
===========================
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/spades/mf:1;
export __LMOD_REF_COUNT_MODULEPATH;
MODULEPATH=ProjectDIR/rt/spades/mf;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={["MTversion"]=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spades/mf",},["systemBaseMPATH"]="ProjectDIR/rt/spades/mf",}';
export _ModuleTable_;
===========================
step 3
lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider spades
===========================
MODULEPATH=ProjectDIR/rt/spades/mf;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={["MTversion"]=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spades/mf",},["systemBaseMPATH"]="ProjectDIR/rt/spades/mf",}';
export _ModuleTable_;
58 changes: 58 additions & 0 deletions rt/spades/spades.tdesc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
-- -*- lua -*-
local testName = "spades"

testdescript = {
owner = "rtm",
product = "modules",
description = [[
nvv_prereq
]],
keywords = {testName },

active = true,
testName = testName,
job_submit_method = "INTERACTIVE",

runScript = [[
. $(projectDir)/rt/common_funcs.sh
unsetMT
initStdEnvVars
export MODULEPATH=$(testDir)/mf
rm -fr _stderr.* _stdout.* err.* out.* .lmod.d
runLmod --version # 1
mkdir -p $HOME/.lmod.d/cache
buildSpiderT $MODULEPATH > $HOME/.lmod.d/cache/spiderT.lua
buildDbT $MODULEPATH > $HOME/.lmod.d/cache/dbT.lua
runLmod avail # 2
runLmod spider spades # 3
HOME=$ORIG_HOME
cat _stdout.[0-9][0-9][0-9] > _stdout.orig
joinBase64Results -bash _stdout.orig _stdout.new
cleanUp _stdout.new out.txt
cat _stderr.[0-9][0-9][0-9] > _stderr.orig
cleanUp _stderr.orig err.txt
rm -f results.csv
wrapperDiff --csv results.csv $(testDir)/out.txt out.txt
wrapperDiff --csv results.csv $(testDir)/err.txt err.txt
testFinish -r $(resultFn) -t $(runtimeFn) results.csv
]],


blessScript = [[
# perform what is needed
]],

tests = {
{ id='t1'},
},

}
4 changes: 2 additions & 2 deletions rt/use_w_sticky/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
step 1
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
===========================
Modules based on Lua: Version 7.8.14 2019-01-14 13:30 -06:00
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
by Robert McLay [email protected]
===========================
step 2
Expand Down Expand Up @@ -31,7 +31,7 @@ running: module --regression_testing -T use ProjectDIR/rt/use_w_sticky/mf/Other
Prepending: ProjectDIR/rt/use_w_sticky/mf/Other to MODULEPATH
Prepending: ProjectDIR/rt/use_w_sticky/mf/A to MODULEPATH
reloadAll(1)(HPCBIOS)
(1)Unloading: HPCBIOS (status: active) (fn: ProjectDIR/rt/use_w_sticky/mf/Core/HPCBIOS/2016q2.lua)
(1)(1)Unloading: HPCBIOS (status: active) (fn: ProjectDIR/rt/use_w_sticky/mf/Core/HPCBIOS/2016q2.lua)
Removing: ProjectDIR/rt/use_w_sticky/mf/Other from MODULEPATH
reloadAll(2)()
Inactive Modules:
Expand Down
3 changes: 2 additions & 1 deletion src/Spider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ function M.buildDbT(self, mpathA, mpathMapT, spiderT, dbT)
t.hidden = not mrc:isVisible({fullName=fullName, sn=sn, fn=vv.fn})
T[vv.fn] = t
end
elseif (next(v.dirT) ~= nil) then
end
if (next(v.dirT) ~= nil) then
for name, vv in pairs(v.dirT) do
buildDbT_helper(mpath, sn, vv, T)
end
Expand Down

0 comments on commit f78f32e

Please sign in to comment.