Skip to content

Commit f78f32e

Browse files
author
Robert McLay
committed
Fix bug where mixing NV and NVV in the same module sn caused ml spider to miss the NVV modules
1 parent 0925066 commit f78f32e

File tree

14 files changed

+198
-76
lines changed

14 files changed

+198
-76
lines changed

README.new

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ Lmod 7.8+
2222
(7.8.14) Add Lmod version report to --trace output.
2323
(7.8.15) issue #394: use mname = MName:new("load",mt:userName(sn)) to get loadable file
2424
contrib/tracking_module_usage python scripts have been updated to support python2 and python3
25+
(7.8.16) Fix bug where spider reported incorrect results when a site mixed NV and NVV together in a single module.
26+

rt/cc/cc.tdesc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ testdescript = {
99
]],
1010
keywords = {testName },
1111

12-
active = true,
12+
active = false,
1313
testName = testName,
1414
job_submit_method = "INTERACTIVE",
1515

rt/dyn/err.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
step 1
33
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
44
===========================
5-
Modules based on Lua: Version 7.8.14 2019-01-14 13:30 -06:00
5+
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
66
by Robert McLay [email protected]
77
===========================
88
step 2
@@ -13,24 +13,24 @@ step 3
1313
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T load gcc fenics
1414
===========================
1515
running: module --regression_testing -T load gcc fenics
16-
(1)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
16+
(1)(0)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
1717
Prepending: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 to MODULEPATH
1818
Lmod is automatically replacing "intel/18.0.1" with "gcc/7.1".
19-
(2)Unloading: intel (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/intel/18.0.1.lua)
19+
(2)(0)Unloading: intel (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/intel/18.0.1.lua)
2020
Removing: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0 from MODULEPATH
21-
(3)Unloading: gcc (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua)
21+
(3)(0)Unloading: gcc (status: active) (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua)
2222
Removing: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 from MODULEPATH
23-
(4)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
23+
(4)(0)Loading: gcc (fn: ProjectDIR/rt/dyn/mf/Core/gcc/7.1.lua, using Find-Best)
2424
Prepending: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1 to MODULEPATH
2525
Pushing fenics on moduleQ
2626
reloadAll(1)(impi, gcc)
27-
(5)Unloading: impi (status: active) (fn: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0/impi/18.0.1.lua)
27+
(5)(1)Unloading: impi (status: active) (fn: ProjectDIR/rt/dyn/mf/Compiler/intel/18.0/impi/18.0.1.lua)
2828
Removing: ProjectDIR/rt/dyn/mf/MPI/intel/18.0/impi/18.0 from MODULEPATH
2929
reloadAll(2)(gcc)
30-
(6)Loading: impi (fn: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1/impi/18.0.1.lua, using Find-Best)
30+
(6)(1)Loading: impi (fn: ProjectDIR/rt/dyn/mf/Compiler/gcc/7.1/impi/18.0.1.lua, using Find-Best)
3131
Prepending: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0 to MODULEPATH
3232
reloadAll(2)(gcc, impi)
33-
(7)Loading: fenics (fn: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0/fenics/1.0.lua, using Find-Best)
33+
(7)(0)Loading: fenics (fn: ProjectDIR/rt/dyn/mf/MPI/gcc/7.1/impi/18.0/fenics/1.0.lua, using Find-Best)
3434
Due to MODULEPATH changes, the following have been reloaded:
3535
1) impi/18.0.1
3636
===========================

rt/family/err.txt

+60-60
Large diffs are not rendered by default.

rt/rstats/err.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
step 1
33
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
44
===========================
5-
Modules based on Lua: Version 7.8.12 2019-01-08 16:15 -06:00
5+
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
66
by Robert McLay [email protected]
77
===========================
88
step 2
99
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T load Rpkgs
1010
===========================
1111
running: module --regression_testing -T load Rpkgs
12-
(1)Loading: Rpkgs (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua, using Find-Best)
13-
(2)Loading: Rstats/3.4.0 (fn: ProjectDIR/rt/rstats/mf/Core/Rstats/3.4.0.lua, using Find-Best)
12+
(1)(0)Loading: Rpkgs (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua, using Find-Best)
13+
(2)(0)Loading: Rstats/3.4.0 (fn: ProjectDIR/rt/rstats/mf/Core/Rstats/3.4.0.lua, using Find-Best)
1414
===========================
1515
step 3
1616
lua ProjectDIR/src/lmod.in.lua bash --regression_testing list
@@ -22,4 +22,4 @@ step 4
2222
lua ProjectDIR/src/lmod.in.lua bash --regression_testing -T unload Rpkgs
2323
===========================
2424
running: module --regression_testing -T unload Rpkgs
25-
(1)Unloading: Rpkgs (status: active) (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua)
25+
(1)(0)Unloading: Rpkgs (status: active) (fn: ProjectDIR/rt/rstats/mf/Core/Rpkgs/3.4.0.lua)

rt/spades/err.txt

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
===========================
2+
step 1
3+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
4+
===========================
5+
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
6+
by Robert McLay [email protected]
7+
===========================
8+
step 2
9+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing avail
10+
===========================
11+
ProjectDIR/rt/spades/mf
12+
spades/py27/3.13 spades/py36/3.13 spades/3.12 (D)
13+
Where:
14+
D: Default Module
15+
Module defaults are chosen based on Find First Rules due to Name/Version/Version modules found in the module tree.
16+
See https://lmod.readthedocs.io/en/latest/060_locating.html for details.
17+
Use "module spider" to find all possible modules.
18+
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
19+
===========================
20+
step 3
21+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider spades
22+
===========================
23+
spades:
24+
Versions:
25+
spades/py27/3.13
26+
spades/py36/3.13
27+
spades/3.12
28+
For detailed information about a specific "spades" module (including how to load the modules) use the module's full name.
29+
For example:
30+
$ module spider spades/py36/3.13

rt/spades/mf/spades/.version

Whitespace-only changes.

rt/spades/mf/spades/3.12.lua

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pushenv("CONDA_DEFAULT_ENV","spades-3.12.0")
2+
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.12.0/bin",priority=100}
3+
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")

rt/spades/mf/spades/py27/3.13.lua

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pushenv("CONDA_DEFAULT_ENV","spades-3.13.0-py27")
2+
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.13.0-py27/bin",priority=100}
3+
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")

rt/spades/mf/spades/py36/3.13.lua

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pushenv("CONDA_DEFAULT_ENV","spades-3.13.0-py36")
2+
prepend_path{"PATH","/util/opt/anaconda/deployed-conda-envs/packages/spades/envs/spades-3.13.0-py36/bin",priority=100}
3+
append_path("CONDA_ENVS_PATH", "/util/opt/anaconda/deployed-conda-envs/packages/spades/envs")

rt/spades/out.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
===========================
2+
step 1
3+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
4+
===========================
5+
===========================
6+
step 2
7+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing avail
8+
===========================
9+
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/spades/mf:1;
10+
export __LMOD_REF_COUNT_MODULEPATH;
11+
MODULEPATH=ProjectDIR/rt/spades/mf;
12+
export MODULEPATH;
13+
_ModuleTable_='_ModuleTable_={["MTversion"]=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spades/mf",},["systemBaseMPATH"]="ProjectDIR/rt/spades/mf",}';
14+
export _ModuleTable_;
15+
===========================
16+
step 3
17+
lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider spades
18+
===========================
19+
MODULEPATH=ProjectDIR/rt/spades/mf;
20+
export MODULEPATH;
21+
_ModuleTable_='_ModuleTable_={["MTversion"]=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spades/mf",},["systemBaseMPATH"]="ProjectDIR/rt/spades/mf",}';
22+
export _ModuleTable_;

rt/spades/spades.tdesc

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
-- -*- lua -*-
2+
local testName = "spades"
3+
4+
testdescript = {
5+
owner = "rtm",
6+
product = "modules",
7+
description = [[
8+
nvv_prereq
9+
]],
10+
keywords = {testName },
11+
12+
active = true,
13+
testName = testName,
14+
job_submit_method = "INTERACTIVE",
15+
16+
runScript = [[
17+
18+
. $(projectDir)/rt/common_funcs.sh
19+
20+
unsetMT
21+
initStdEnvVars
22+
export MODULEPATH=$(testDir)/mf
23+
24+
rm -fr _stderr.* _stdout.* err.* out.* .lmod.d
25+
26+
runLmod --version # 1
27+
28+
mkdir -p $HOME/.lmod.d/cache
29+
buildSpiderT $MODULEPATH > $HOME/.lmod.d/cache/spiderT.lua
30+
buildDbT $MODULEPATH > $HOME/.lmod.d/cache/dbT.lua
31+
32+
runLmod avail # 2
33+
runLmod spider spades # 3
34+
35+
HOME=$ORIG_HOME
36+
cat _stdout.[0-9][0-9][0-9] > _stdout.orig
37+
joinBase64Results -bash _stdout.orig _stdout.new
38+
cleanUp _stdout.new out.txt
39+
40+
cat _stderr.[0-9][0-9][0-9] > _stderr.orig
41+
cleanUp _stderr.orig err.txt
42+
43+
rm -f results.csv
44+
wrapperDiff --csv results.csv $(testDir)/out.txt out.txt
45+
wrapperDiff --csv results.csv $(testDir)/err.txt err.txt
46+
testFinish -r $(resultFn) -t $(runtimeFn) results.csv
47+
]],
48+
49+
50+
blessScript = [[
51+
# perform what is needed
52+
]],
53+
54+
tests = {
55+
{ id='t1'},
56+
},
57+
58+
}

rt/use_w_sticky/err.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
step 1
33
lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version
44
===========================
5-
Modules based on Lua: Version 7.8.14 2019-01-14 13:30 -06:00
5+
Modules based on Lua: Version 7.8.15 2019-01-16 12:46 -06:00
66
by Robert McLay [email protected]
77
===========================
88
step 2
@@ -31,7 +31,7 @@ running: module --regression_testing -T use ProjectDIR/rt/use_w_sticky/mf/Other
3131
Prepending: ProjectDIR/rt/use_w_sticky/mf/Other to MODULEPATH
3232
Prepending: ProjectDIR/rt/use_w_sticky/mf/A to MODULEPATH
3333
reloadAll(1)(HPCBIOS)
34-
(1)Unloading: HPCBIOS (status: active) (fn: ProjectDIR/rt/use_w_sticky/mf/Core/HPCBIOS/2016q2.lua)
34+
(1)(1)Unloading: HPCBIOS (status: active) (fn: ProjectDIR/rt/use_w_sticky/mf/Core/HPCBIOS/2016q2.lua)
3535
Removing: ProjectDIR/rt/use_w_sticky/mf/Other from MODULEPATH
3636
reloadAll(2)()
3737
Inactive Modules:

src/Spider.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@ function M.buildDbT(self, mpathA, mpathMapT, spiderT, dbT)
523523
t.hidden = not mrc:isVisible({fullName=fullName, sn=sn, fn=vv.fn})
524524
T[vv.fn] = t
525525
end
526-
elseif (next(v.dirT) ~= nil) then
526+
end
527+
if (next(v.dirT) ~= nil) then
527528
for name, vv in pairs(v.dirT) do
528529
buildDbT_helper(mpath, sn, vv, T)
529530
end

0 commit comments

Comments
 (0)