From d2df916ca1ee2168b4d13a94298533b9f0d8e1cf Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Tue, 21 Dec 2021 19:30:23 -0600 Subject: [PATCH] Issue #551: Fix output of spider level 2 output to not mix the description and help from two different modulefiles --- MF/settarg.version.lua | 3 + README.new | 3 +- rt/settarg/err.txt | 3 + rt/spider/err.txt | 62 +++- .../mf2/Compiler/gcc/10/GROMACS/2018.lua | 21 ++ .../mf2/Compiler/gcc/10/GROMACS/2019.lua | 21 ++ .../mf2/Compiler/zuda/10/GROMACS/2019.lua | 21 ++ rt/spider/mf2/Core/gcc/10.1.lua | 2 + rt/spider/mf2/Core/zuda/10.1.lua | 2 + rt/spider/out.txt | 328 ++++++++++++++++++ rt/spider/spider.tdesc | 15 + src/Spider.lua | 20 +- tools/Banner.lua | 8 +- 13 files changed, 497 insertions(+), 12 deletions(-) create mode 100644 rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua create mode 100644 rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua create mode 100644 rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua create mode 100644 rt/spider/mf2/Core/gcc/10.1.lua create mode 100644 rt/spider/mf2/Core/zuda/10.1.lua diff --git a/MF/settarg.version.lua b/MF/settarg.version.lua index 60f451440..b83c75650 100644 --- a/MF/settarg.version.lua +++ b/MF/settarg.version.lua @@ -128,4 +128,7 @@ along with important modules like the compiler and mpi stack. Settarg can do more. Please see the Lmod website for more details. ]] +whatis([==[Description: +The settarg module provides a way to connect the loaded modules with your build system by setting environment variables. +]==]) help(helpMsg) diff --git a/README.new b/README.new index ce0583475..95d896b45 100644 --- a/README.new +++ b/README.new @@ -4,9 +4,10 @@ Lmod 8.6+ to search path * Issue #549: LMOD_AVAIL_STYLE can now be overridden in the lmod_config.lua file. * Issue #548: Fix dependency check to check both sn and fullname of loaded module. -W.I.P:s (8.6.2) * loading the settarg module always set precmd and (PROMPT_COMMAND=precmd for bash). Now use LMOD_SETTARG_FUNCTIONS=yes LMOD_SETTARG_IN_PROMPT=yes env. var conttrol. + * Issue #551: Fix the output of level 2 spider output to not mix the description and help from + different modulefiles diff --git a/rt/settarg/err.txt b/rt/settarg/err.txt index af91a2c1c..854525bf1 100644 --- a/rt/settarg/err.txt +++ b/rt/settarg/err.txt @@ -114,6 +114,9 @@ set_shell_function("precmd"," local tilde=\"~\";\ ${USER_PROMPT_CMD:-:};\ ","") pushenv("PROMPT_COMMAND","precmd") +whatis("Description: +The settarg module provides a way to connect the loaded modules with your build system by setting environment variables. +") help([[The settarg module dynamically and automatically updates "$TARG" and a host of other environment variables. These new environment variables encapsulate the state of the modules loaded. diff --git a/rt/spider/err.txt b/rt/spider/err.txt index a137f71d1..fe0864255 100644 --- a/rt/spider/err.txt +++ b/rt/spider/err.txt @@ -2,7 +2,7 @@ step 1 lua ProjectDIR/src/lmod.in.lua bash --regression_testing --version =========================== -Modules based on Lua: Version 8.5.28 2021-12-01 12:20 -06:00 +Modules based on Lua: Version 8.6.1 2021-12-10 14:46 -06:00 by Robert McLay mclay@tacc.utexas.edu =========================== step 2 @@ -822,3 +822,63 @@ Currently Loaded Modules: 1) GROMACS/.2016.x-drude-20180214-g3f7439a (H) Where: H: Hidden Module +=========================== +step 66 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider +=========================== +The following is a list of the modules and extensions currently available: + gcc: gcc/10.1 + GROMACS: GROMACS/2018, GROMACS/2019 + GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. + zuda: zuda/10.1 +To learn more about a package execute: + $ module spider Foo +where "Foo" is the name of a module. +To find detailed information about a particular package you +must specify the version if there is more than one version: + $ module spider Foo/11.1 +=========================== +step 67 +runSpiderCmd -o spiderT ProjectDIR/rt/spider/mf2/Core +=========================== +=========================== +step 68 +runSpiderCmd -o dbT ProjectDIR/rt/spider/mf2/Core +=========================== +=========================== +step 69 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider GROMACS/2018 +=========================== + GROMACS: GROMACS/2018 + Description: + GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. + You will need to load all module(s) on any one of the lines below before the "GROMACS/2018" module is available to load. + gcc/10.1 + Help: + HELP Description + ================ + GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. + More information + ================ + - Homepage: http://www.gromacs.org +=========================== +step 70 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider GROMACS/2019 +=========================== + GROMACS: GROMACS/2019 + Description: + GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. + You will need to load all module(s) on any one of the lines below before the "GROMACS/2019" module is available to load. + gcc/10.1 + zuda/10.1 + Help: + HELP Description + ================ + GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. + More information + ================ + - Homepage: http://www.gromacs.org diff --git a/rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua b/rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua new file mode 100644 index 000000000..416c699fe --- /dev/null +++ b/rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua @@ -0,0 +1,21 @@ +help([==[ + +HELP Description +================ +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. + + +More information +================ + - Homepage: http://www.gromacs.org +]==]) + +whatis([==[Description: +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +]==]) diff --git a/rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua b/rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua new file mode 100644 index 000000000..fe53b0898 --- /dev/null +++ b/rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua @@ -0,0 +1,21 @@ +help([==[ + +HELP Description +================ +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. + + +More information +================ + - Homepage: http://www.gromacs.org +]==]) + +whatis([==[Description: +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +]==]) diff --git a/rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua b/rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua new file mode 100644 index 000000000..73f4c773c --- /dev/null +++ b/rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua @@ -0,0 +1,21 @@ +help([==[ + +HELP Description +================ +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a GPU only build, containing both MPI and threadMPI builds for 2019. + + +More information +================ + - Homepage: http://www.gromacs.org +]==]) + +whatis([==[Description: +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. + +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +]==]) diff --git a/rt/spider/mf2/Core/gcc/10.1.lua b/rt/spider/mf2/Core/gcc/10.1.lua new file mode 100644 index 000000000..3891fa6a3 --- /dev/null +++ b/rt/spider/mf2/Core/gcc/10.1.lua @@ -0,0 +1,2 @@ +local modulepath_root = os.getenv("MODULEPATH_ROOT2") +prepend_path("MODULEPATH",pathJoin(modulepath_root,"Compiler/gcc/10")) diff --git a/rt/spider/mf2/Core/zuda/10.1.lua b/rt/spider/mf2/Core/zuda/10.1.lua new file mode 100644 index 000000000..d29d2eb9b --- /dev/null +++ b/rt/spider/mf2/Core/zuda/10.1.lua @@ -0,0 +1,2 @@ +local modulepath_root = os.getenv("MODULEPATH_ROOT2") +prepend_path("MODULEPATH",pathJoin(modulepath_root,"Compiler/zuda/10")) diff --git a/rt/spider/out.txt b/rt/spider/out.txt index ceb8c6f89..5d7e9b772 100644 --- a/rt/spider/out.txt +++ b/rt/spider/out.txt @@ -1167,3 +1167,331 @@ MODULEPATH=ProjectDIR/rt/spider/mf/I_Core; export MODULEPATH; _ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={GROMACS={fn="ProjectDIR/rt/spider/mf/I_Core/GROMACS/.2016.x-drude-20180214-g3f7439a.lua",fullName="GROMACS/.2016.x-drude-20180214-g3f7439a",loadOrder=1,propT={},stackDepth=0,status="active",userName="GROMACS/.2016.x-drude-20180214-g3f7439a",wV="000000000.000002016.*x.*drude.*zfinal-.020180214.*g.000000003.*f.000007439.*a.*zfinal",},},mpathA={"ProjectDIR/rt/spider/mf/I_Core",},systemBaseMPATH="ProjectDIR/rt/spider/mf/I_Core",}'; export _ModuleTable_; +=========================== +step 66 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider +=========================== +__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/spider/mf2/Core:1; +export __LMOD_REF_COUNT_MODULEPATH; +MODULEPATH=ProjectDIR/rt/spider/mf2/Core; +export MODULEPATH; +_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spider/mf2/Core",},systemBaseMPATH="ProjectDIR/rt/spider/mf2/Core",}'; +export _ModuleTable_; +=========================== +step 67 +runSpiderCmd -o spiderT ProjectDIR/rt/spider/mf2/Core +=========================== +timestampFn = { + false, +} +mrcT = { + alias2modT = { + intelcompiler = "intel", + }, + hiddenT = { + ["gcc/4.8"] = true, + }, + version2modT = { + ["intel/17"] = "intel/2017.1.132", + ["intel/2017"] = "intel/2017.1.132", + }, +} +mrcMpathT = {} +spiderT = { + ["ProjectDIR/rt/spider/mf2/Compiler/gcc/10"] = { + GROMACS = { + defaultA = {}, + defaultT = {}, + dirT = {}, + fileT = { + ["GROMACS/2018"] = { + Description = [[GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +]], + Version = "2018", + canonical = "2018", + fn = "ProjectDIR/rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua", + help = [[ +HELP Description +================ +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +More information +================ + - Homepage: http://www.gromacs.org +]], + luaExt = 5, + mpath = "ProjectDIR/rt/spider/mf2/Compiler/gcc/10", + pV = "000002018.*zfinal", + wV = "000002018.*zfinal", + whatis = { + [[Description: +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +]], + }, + }, + ["GROMACS/2019"] = { + Description = [[GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +]], + Version = "2019", + canonical = "2019", + fn = "ProjectDIR/rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua", + help = [[ +HELP Description +================ +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +More information +================ + - Homepage: http://www.gromacs.org +]], + luaExt = 5, + mpath = "ProjectDIR/rt/spider/mf2/Compiler/gcc/10", + pV = "000002019.*zfinal", + wV = "000002019.*zfinal", + whatis = { + [[Description: +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +]], + }, + }, + }, + }, + }, + ["ProjectDIR/rt/spider/mf2/Compiler/zuda/10"] = { + GROMACS = { + defaultA = {}, + defaultT = {}, + dirT = {}, + fileT = { + ["GROMACS/2019"] = { + Description = [[GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +]], + Version = "2019", + canonical = "2019", + fn = "ProjectDIR/rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua", + help = [[ +HELP Description +================ +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +More information +================ + - Homepage: http://www.gromacs.org +]], + luaExt = 5, + mpath = "ProjectDIR/rt/spider/mf2/Compiler/zuda/10", + pV = "000002019.*zfinal", + wV = "000002019.*zfinal", + whatis = { + [[Description: +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +]], + }, + }, + }, + }, + }, + ["ProjectDIR/rt/spider/mf2/Core"] = { + gcc = { + defaultA = {}, + defaultT = {}, + dirT = {}, + fileT = { + ["gcc/10.1"] = { + Version = "10.1", + canonical = "10.1", + fn = "ProjectDIR/rt/spider/mf2/Core/gcc/10.1.lua", + luaExt = 5, + mpath = "ProjectDIR/rt/spider/mf2/Core", + pV = "000000010.000000001.*zfinal", + wV = "000000010.000000001.*zfinal", + }, + }, + }, + zuda = { + defaultA = {}, + defaultT = {}, + dirT = {}, + fileT = { + ["zuda/10.1"] = { + Version = "10.1", + canonical = "10.1", + fn = "ProjectDIR/rt/spider/mf2/Core/zuda/10.1.lua", + luaExt = 5, + mpath = "ProjectDIR/rt/spider/mf2/Core", + pV = "000000010.000000001.*zfinal", + wV = "000000010.000000001.*zfinal", + }, + }, + }, + }, + version = 5, +} +mpathMapT = { + ["ProjectDIR/rt/spider/mf2/Compiler/gcc/10"] = { + ["gcc/10.1"] = "ProjectDIR/rt/spider/mf2/Core", + }, + ["ProjectDIR/rt/spider/mf2/Compiler/zuda/10"] = { + ["zuda/10.1"] = "ProjectDIR/rt/spider/mf2/Core", + }, +} +=========================== +step 68 +runSpiderCmd -o dbT ProjectDIR/rt/spider/mf2/Core +=========================== +timestampFn = { + false, +} +dbT = { + GROMACS = { + ["ProjectDIR/rt/spider/mf2/Compiler/gcc/10/GROMACS/2018.lua"] = { + Description = [[GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +]], + Version = "2018", + fullName = "GROMACS/2018", + help = [[ +HELP Description +================ +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +More information +================ + - Homepage: http://www.gromacs.org +]], + hidden = false, + pV = "000002018.*zfinal", + parentAA = { + { + "gcc/10.1", + }, + }, + wV = "000002018.*zfinal", + whatis = { + [[Description: +GROMACS(CPU/2018) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2018. +]], + }, + }, + ["ProjectDIR/rt/spider/mf2/Compiler/gcc/10/GROMACS/2019.lua"] = { + Description = [[GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +]], + Version = "2019", + fullName = "GROMACS/2019", + help = [[ +HELP Description +================ +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +More information +================ + - Homepage: http://www.gromacs.org +]], + hidden = false, + pV = "000002019.*zfinal", + parentAA = { + { + "gcc/10.1", + }, + }, + wV = "000002019.*zfinal", + whatis = { + [[Description: +GROMACS(CPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a CPU enabled build, containing both MPI and threadMPI binaries for 2019. +]], + }, + }, + ["ProjectDIR/rt/spider/mf2/Compiler/zuda/10/GROMACS/2019.lua"] = { + Description = [[GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +]], + Version = "2019", + fullName = "GROMACS/2019", + help = [[ +HELP Description +================ +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +More information +================ + - Homepage: http://www.gromacs.org +]], + hidden = false, + pV = "000002019.*zfinal", + parentAA = { + { + "zuda/10.1", + }, + }, + wV = "000002019.*zfinal", + whatis = { + [[Description: +GROMACS(GPU/2019) is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles. +This is a GPU only build, containing both MPI and threadMPI builds for 2019. +]], + }, + }, + }, + gcc = { + ["ProjectDIR/rt/spider/mf2/Core/gcc/10.1.lua"] = { + Version = "10.1", + fullName = "gcc/10.1", + hidden = false, + pV = "000000010.000000001.*zfinal", + wV = "000000010.000000001.*zfinal", + }, + }, + zuda = { + ["ProjectDIR/rt/spider/mf2/Core/zuda/10.1.lua"] = { + Version = "10.1", + fullName = "zuda/10.1", + hidden = false, + pV = "000000010.000000001.*zfinal", + wV = "000000010.000000001.*zfinal", + }, + }, +} +provideByT = {} +=========================== +step 69 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider GROMACS/2018 +=========================== +MODULEPATH=ProjectDIR/rt/spider/mf2/Core; +export MODULEPATH; +_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spider/mf2/Core",},systemBaseMPATH="ProjectDIR/rt/spider/mf2/Core",}'; +export _ModuleTable_; +=========================== +step 70 +lua ProjectDIR/src/lmod.in.lua bash --regression_testing spider GROMACS/2019 +=========================== +MODULEPATH=ProjectDIR/rt/spider/mf2/Core; +export MODULEPATH; +_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/spider/mf2/Core",},systemBaseMPATH="ProjectDIR/rt/spider/mf2/Core",}'; +export _ModuleTable_; diff --git a/rt/spider/spider.tdesc b/rt/spider/spider.tdesc index 2b5a27df6..bebba9d3c 100644 --- a/rt/spider/spider.tdesc +++ b/rt/spider/spider.tdesc @@ -130,6 +130,21 @@ testdescript = { runLmod load GROMACS/.2016.x-drude-20180214-g3f7439a #64 runLmod list #65 + unsetMT + + export MODULEPATH_ROOT2=$testDir/mf2 + export MODULEPATH=$MODULEPATH_ROOT2/Core + + runLmod spider #66 + runBase runSpiderCmd -o spiderT $MODULEPATH #67 + runBase runSpiderCmd -o dbT $MODULEPATH #68 + runLmod spider GROMACS/2018 #69 + runLmod spider GROMACS/2019 #70 + + + + + HOME=$ORIG_HOME cat _stdout.[0-9][0-9][0-9] > _stdout.orig diff --git a/src/Spider.lua b/src/Spider.lua index f3ccb760a..109bb955e 100644 --- a/src/Spider.lua +++ b/src/Spider.lua @@ -321,7 +321,7 @@ function M.findAllModules(self, mpathA, spiderT) if (not attr or attr.mode ~= "directory" or (not access(mpath,"rx"))) then break end - dbg.print{"RTM mpath: ", mpath,"\n"} + dbg.print{"mpath: ", mpath,"\n"} local moduleA = ModuleA:__new({mpath}, maxdepthT):moduleA() local T = moduleA[1].T for sn, v in pairs(T) do @@ -995,6 +995,7 @@ function M._Level1(self, dbT, providedByT, possibleA, sn, key, helpFlg) local T = dbT[sn] local TT = providedByT[sn] local tailMsg = nil + local sort = table.sort if (T == nil and TT == nil) then LmodSystemError{msg="e_dbT_sn_fail", sn = sn} end @@ -1018,6 +1019,7 @@ function M._Level1(self, dbT, providedByT, possibleA, sn, key, helpFlg) dbg.print{"key: ",key,"\n"} for fn, v in pairs(T) do if (show_hidden or mrc:isVisible{fullName=v.fullName,sn=sn,fn=fn}) then + v.fn=fn if (v.fullName == key) then aa[#aa + 1] = v end @@ -1037,6 +1039,12 @@ function M._Level1(self, dbT, providedByT, possibleA, sn, key, helpFlg) entryMA = bb end + local function cmp(a,b) + return a.fn < b.fn + end + + sort(entryMA,cmp) + --io.stderr:write("m_count: ",m_count,"\n") --for i = 1,#aa do -- io.stderr:write("aa i:",i,": ",aa[i].fullName,"\n") @@ -1307,16 +1315,16 @@ function M._Level2(self, sn, fullName, entryA, entryPA, possibleA, tailMsg) titleIdx = ia for k = 1, #entryA do - entryT = entryA[k] - if (not entryT.parentAA) then + local my_entryT = entryA[k] + if (not my_entryT.parentAA) then haveCore = 1 else b[#b+1] = " " haveHier = 2 end - if (entryT.parentAA) then - for j = 1, #entryT.parentAA do - local parentA = entryT.parentAA[j] + if (my_entryT.parentAA) then + for j = 1, #my_entryT.parentAA do + local parentA = my_entryT.parentAA[j] for i = 1, #parentA do b[#b+1] = parentA[i] b[#b+1] = ' ' diff --git a/tools/Banner.lua b/tools/Banner.lua index e90cfacc3..47c4f2bd8 100644 --- a/tools/Banner.lua +++ b/tools/Banner.lua @@ -85,11 +85,11 @@ end function M.border(self, nspaces) if (not self.__borderG or nspaces ~= self.__nspacesG) then self.__nspacesG = nspaces - local myWidth = self:width() - 4 - nspaces + local myWidth = min(self:width() - 4 - nspaces,1000) local a = {} - a[1] = rep(" ", nspaces) - a[2] = rep('-', myWidth) - a[3] = "\n" + a[#a+1] = rep(" ", nspaces) + a[#a+1] = rep('-', myWidth) + a[#a+1] = "\n" self.__borderG = concatTbl(a,"") end return self.__borderG