I'm having my first tinker with modules. I've installed lmod and easybuild and have built a package (SAMtools) with its dependencies.
Running module av
shows the modules are available. It lists them twice, once in the 'all' category and also in their relevant category. If I try to load a module like bio/SAMtools
, it complains that it can't find the dependencies. I assume this is because it's looking for ncurses
when it needs to look for all/ncurses
or devel/ncurses
.
I know I could just change the modulepath to point straight at the all
directory instead of the directory containing the category directories but wanted to know if this was the correct approach or if I'm doing something wrong and module
should be able to locate the module dependencies..
module
(whether it is Environment Modules or Lmod) looks for the module name as a directory under the enabled modulepath. So if your enabled modulepath is /path/to/modulefiles
, if you try to load devel/ncurses
it will look at version files under /path/to/modulefiles/devel/ncurses
directory.
As the modules generated by easybuild defines dependency as ncurses
and not all/ncurses
or devel/ncurses
, it means the modulepath to enable should be /path/to/modulefiles/all
or /path/to/modulefiles/devel
.
Locating modulefile section in modulefile(4) man page gives details on how modules are searched. This is the documentation for Environment Modules, but the mechanism is quite similar on Lmod.