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. A modulefile contains the necessary information to manipulate the users' environment; such as information to add or remove directories from the PATH, LD_LIBRARY_PATH, CPATH and other environment variables. All popular shells are supported, including Bash, csh, fish, ksh, sh, tcsh, zsh, as well as some scripting languages such as Tcl/Tk, Perl and Python.
Lmod is used in HPC clusters, research labs and scientific computing environments all over the world. It is an alternative implementation for the classic Tcl/TK environment modules and improves upon it by creating module hierarchies, which allow setting of proper dependency structures for more stringent regulation of module loading and unloading.
Installation
USE flags
USE flags for sys-cluster/lmod Environment Module System based on Lua
+auto-swap
|
enable auto swapping of compiler |
+cache
|
enable caching of modules |
duplicate-paths
|
allow duplicate entries in path |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
Emerge
root #
emerge --ask sys-cluster/lmod
Configuration
Files
- /etc/modulefiles/ - Default location for modulefiles.
- /etc/lmod_cache/spider_cache - Default spider cache directory.
- /etc/lmod_cache/system.txt - Default spider cache file.
Usage
The default installation enables the module command for all users, by sourcing /etc/profile.d/lmod.sh.
user $
man module
user $
module -h
Spider Cache
By default, Lmod enables spider cache. It is highly recommended to keep the spider cache enabled and up to date. The following command updates the spider cache.
root #
/usr/share/Lmod/libexec/update_lmod_system_cache_files $MODULEPATH