LMOD - Module System
What is LMOD?
Lmod is a Lua based module system that easily handles the MODULEPATH Hierarchical problem. Environment Modules provide a convenient way to dynamically change the users’ environment through modulefiles. This includes easily adding or removing directories to the PATH environment variable. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found. - LMOD
LMOD Commands
To find out what modules are currently loaded, use the following command:
$ module listTo find out what modules are available to be loaded, use the following command:
$ module availAnother way to search for modules is with the “module spider” command. This command searches the entire list of possible modules.
$ module spiderUsers can check to see what is installed for specific software by adding the name of the software to the command.
$ module avail python
$ module spider pythonTo load packages, use the following command:
$ module load package1 package2 ...To unload packages, use the following command:
$ module unload package1 package2 ...To remove all modules, use the following command:
$ module purgeTo go back to the initial set of modules, use the following command:
$ module resetLoading Specific Versions of a Module
There may be multiple versions of a module. The default version is marked with a (D) in the module avail command. The following is necessary to load other versions:
$ module load python/3.11.9Showing the contents of a module
To show the module functions instead of executing them, use the following command:
$ module show pythonml Shortcut
Instead of using module users can use ml instead. This is simply a shortcut command that has the same functionality as module.
$ ml
$ ml avail
$ ml load pythonShell Tweaks
Disable the user lmod spider cache to resolve occasional stack overflows with
ml avecho 'export LMOD_SHORT_TIME=86400' >> ~/.bashrc
Community Space
There are community spaces that users can install software into that can be loaded into LMOD. These are handled via Spack. There is documentation on how to use Spack here.
There is an RIS space that is the location of the TPHC bare-metal installed software. Find out more about the installed software here.
Spaces can be loaded like any software with LMOD.
module load risThe spider command will only work for applications that are part of a community space when it is loaded.
E.g. Modules available in the ris space will only show up once it has been loaded.
module load risFurther Information
More information about the LMOD system can be found in the LMOD docs.