New Features in Lmod

LmodBreak (msg):

LmodBreak() modulefile function causes the evaluation of the current modulefile to stop and all changed in the user’s environment to be ignored from the current modulefile. However, all other modulefiles are evaluated. In TCL modulefiles, this command is break. New in Lmod 8.6+

/etc/lmod/lmod_config.lua:

Lmod looks for a file named lmod_config.lua in the LMOD_CONFIG_DIR which is by default /etc/lmod/lmod_config.lua. This file allows sites configure lmod through lua instead of setting environment variables by using the cosmit:assigin() functions:

cosmit:assign("LMOD_SITE_NAME","XYZZY")

See Configuring Lmod with /etc/lmod/lmod_config.lua: for details. New in Lmod 8.6+

LMOD_QUARANTINE_VARS:

This is an environment variable containing a list of environment variables that Lmod will not change the value of. Note that this only applies to non-path variables. Variables such as PATH or LD_LIBRARY_PATH are ignored in this variable. In other words, Lmod could change any path like variables. New in Lmod 8.6+

source_sh (“shellName”,”shell_script arg1 …”):

source a shell script as part of a module. Supported shellNames are sh, dash, bash, zsh, csh, tcsh, ksh. When loading, Lmod automatically converts the shell script into module commands and saves the module commands in the environment. It does this by sourcing the shell script string in a subshell and comparing the environment before and after sourcing the shell script string. When unloading, the saved module commands from the environment are used.

See Shell scripts and Lmod for details (New in version 8.6)

sh_to_modulefile:

New in version 8.6, it now track converts alias and shell functions as well as environment variables into a modulefile.

LMOD_SITE_MODULEPATH:

An colon separated list of directories to be prepended to $MODULEPATH before the first call to the Lmod command. See Installing Lmod for details New in version 8.5.18

module overview:

Similar to module avail, this command prints the just module name and not the name and the version. The number of versions is printed next to the module name: For example:

$ module overview

------------ /apps/modulefiles/Core -------------
StdEnv    (1)   hashrf    (2)   papi        (2)
ddt       (1)   intel     (2)   singularity (2)
git       (1)   noweb     (1)   valgrind    (1)

New in version 8.5.10+

sh_to_modulefile:

New in version 8.6, it now track converts alias and shell functions as well as environment variables into a modulefile.

extension():

New in version 8.2.5+, Lmod provides a module function which says that these packages available when this module is loaded. See Module Extensions for details.

depends_on():

A safe way to have one module load another. See Dependent Modules for details. New in version 7.5.12+