Lmod: A New Environment Module System¶
PURPOSE¶
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.
OVERVIEW¶
This guide is written to explain what Environment Modules are and why they are very useful for both users and system administrators. Lmod is an implementation of Environment Modules, much of what is said here is true for any environment modules system but there are many features which are unique to Lmod.
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.
A modulefile contains the necessary information to allow a user to run a particular application or provide access to a particular library. All of this can be done dynamically without logging out and back in. Modulefiles for applications modify the user’s path to make access easy. Modulefiles for Library packages provide environment variables that specify where the library and header files can be found.
Packages can be loaded and unloaded cleanly through the module system. All the popular shells are supported: bash, ksh, rc, csh, tcsh, fish, zsh. Also available for perl, python, lisp, cmake, and R.
It is also very easy to switch between different versions of a package or remove it.
Lmod Web Sites¶
Documentation: https://lmod.readthedocs.io/en/latest/
GitHub: https://github.com/TACC/Lmod
SourceForge: https://lmod.sf.net
TACC Homepage: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
Lmod Test Suite: https://github.com/rtmclay/Lmod_test_suite
Join Lmod Mailing list: https://sourceforge.net/projects/lmod/lists/lmod-users
The most up-to-date source is at github. There is a secondary git repo found at SourceForge. Both repos are the same. Stable releases in the form of tar files can be found at Sourceforce. All label versions found at the git repos have passed Lmod’s regression test suite.
Introduction to Lmod¶
If you are new to Lmod then please read the User Guide and possibly the Frequently Asked Questions Guide. Users who wish to read about how to have their own personal modules should read the Advanced User Guide.
Installing Lmod¶
Anyone wishing to install Lmod on a personal computer or for a system should read the Installation Guide as well as the Transitioning to Lmod Guide. The rest of the guides can be read as needed.
- Installing Lua and Lmod
- How to Transition to Lmod (or how to test Lmod without installing it for all)
- Lua Modulefile Functions
- TCL Modulefile Functions
- Lmod Environment variables
- Module names and module naming conventions
- How Lmod Picks which Modulefiles to Load
- Providing A Standard Set Of Modules for all Users
- Converting from TCL/C Environment Modules to Lmod
Advanced Topics¶
- How to report a bug in Lmod
- Rules for PATH-like variables
- How to use a Software Module hierarchy
- Configuring Lmod for your site
- Site and user control of defaults, aliases and hidden modules
- How does Lmod convert TCL modulefile into Lua
- Dependent Modules
- Modulefile Examples from simple to complex
- The Interaction between Modules, MPI and Parallel Filesystems
- Lmod on Shared Home File Systems
- User Spider Cache
- System Spider Cache
- Using the module spider command
- The spider tool
- Deprecating Modules
- Module Properties
- Debugging Modulefiles
- SitePackage.lua and hooks
- Lmod Localization
- Integration of EasyBuild and Lmod
- Providing Custom Labels for Avail
- Load Storms: Long load times or Fails to Load
- Tracing Lmod
- Sticky Modules
- Modify Lmod behavior with SitePackage.lua
- Shell scripts and Lmod
- Tracking Module Usage
- Combining modules and build systems with settarg
- Improving performance of Lmod
- Module Extensions
- A Personal Hierarchy Mirroring the System Hierarchy
- Support Community Modules Collections Safely
Internal Structure of Lmod¶
Topics yet to be written¶
Optional Software layout, two digit rule
Advanced Topics: priority path,