Hello.
I'm currently using the TCL-based environment modules implementation, and want
try out Lmod with my existing modulefiles.
I built the latest release of Lmod and wrote a modulefile for it, so I can
switch the implementation to Lmod via a simple 'module load lmod' command.
This works fine and Lmod supported most TCL modulefiles without problem; but
then I noticed it is much slower when I trying to TAB-complete the module name
in command 'module load ' in bash(1). By using 'set -x' I learned that both
implementation used 'avail' subcommand to retrieve available module names for
completion.
Here's the speed comparison of 'module avail':
$ module --version
Modules Release 5.3.1 (2023-06-27)
$ time module avail > /dev/null 2>&1
real 0m0.194s
user 0m0.066s
sys 0m0.022s
$ time module avail > /dev/null 2>&1
real 0m0.071s
user 0m0.054s
sys 0m0.007s
$ module load lmod
$ module --version
Modules based on Lua: Version 8.7 2022-04-16 13:49 -05:00
by Robert McLay mc...@ta...
$ time module avail > /dev/null 2>&1
real 0m0.630s
user 0m0.561s
sys 0m0.049s
$ time module avail > /dev/null 2>&1
real 0m0.613s
user 0m0.550s
sys 0m0.042s
$ time module avail > /dev/null 2>&1
real 0m0.623s
user 0m0.562s
sys 0m0.037s
|