Other module implementations

Since the inception of the Environment Modules project in 1991, the module command has become a de facto standard interface for dynamically modifying a user's environment via modulefiles. Over time, several alternative implementations of the module command have been developed.

This document provides an overview of known module command implementations, with a particular focus on Lmod, the most widely adopted alternative. The goal is to inform users and developers of the current landscape of module system tools.

Lmod

Lmod is an implementation of Environment Modules written in Lua. Its development started in 2008 and along a years Lmod has introduced many new features into the module world: software hierarchy, cache mechanism, Lua modulefile support, ml command, etc.

Lmod gained popularity in the mid-2010s, during a period when the Modules project was largely inactive. It is now widely adopted, particularly in the HPC community.

Today, Lmod and Modules offer broadly similar feature sets. The following table highlights features that are unique to each implementation.

Lmod 8.8

Modules 5.6

The following table highlights module sub-commands that are exclusive to either Lmod or Modules. In some cases, similar functionality exists under different sub-command names or mechanisms. A correspondence table is provided at the end of this section to map these equivalents.

Lmod 8.8

Modules 5.6

category, overview, tablelist

aliases, append-path, cachebuild, cacheclear, clear, config, edit, info-loaded, initadd, initclear, initlist, initprepend, initrm, initswitch, is-saved, is-used, lint, mod-to-sh, path, paths, prepend-path, remove-path, saverm, saveshow, sh-to-mod, source, stash, stashclear, stashlist, stashpop, stashrm, stashshow, state, test

The following table highlights Tcl modulefile commands that are exclusive to either Lmod or Modules. In some cases, similar functionality exists under different command names or mechanisms. A correspondence table is provided at the end of this section to map these equivalents.

Lmod 8.8

Modules 5.6

extensions, remove-property

getvariant, is-saved, is-used, lsb-release, module-help, module-tag, module-virtual, module-warn, modulepath-label, modulepath-label, reportWarning, uncomplete, variant, x-resource

See the Compatibility with Lmod Tcl modulefile section for details on how the implementation of the Tcl modulefile commands differ between Lmod and Modules.

The following table provides a correspondence between features in Lmod and Modules that offer similar functionality, even if they differ in name or implementation.

Lmod 8.8

Modules 5.6

Module properties

Module tags

One name rule

unique_name_loaded configuration option

Custom labels for avail

modulepath-label modulefile command

Irreversible module actions

Change modulefile command behavior

NAG file

module-forbid, module-warn modulefile commands

Lmod + XALT

Logging activity

Hook functions

Override any internal procedures or set trace hook

Autoswap

Conflict unload

LMOD_DOWNSTREAM_CONFLICTS environment variable

Dependencies between modulefiles

LMOD_QUARANTINE_VARS environment variable

protected_envvars configuration option

clearLmod shell function

module clear

update_lmod_system_cache_files script

module cachebuild

sh_to_modulefile script

module sh-to-mod

check_module_tree_syntax script

module lint

module --checkSyntax load

module lint

module --config

module config

$LMOD_CMD bash load

module mod-to-sh bash

module --raw show

EDITOR=cat module edit

module --location show

module path

module --mt

module state

module overview

module avail --no-indepth

module --regexp avail

module avail --contains

module --style=<style_name> avail

module avail --output <element_list>

module category

module search

module --brief list

module config hide_auto_loaded 1

module tablelist

module list --json

module --pin_versions restore

module config collection_pin_version 1 + module save + module restore

module --initial_load restore

module restore during Modules initialization

atleast("foo","5.0")

foo@5.0:

atmost("foo","5.0")

foo@:5.0

between("foo","5.0","7.0")

foo@5.0:7.0

latest("foo")

foo@latest

Other alternatives

This section intends to reference all other existing alternative module implementations.

  • Modulecmd.py: Environment Modules implementation in Python

  • Pmodules: Environment Modules implementation in Bash

  • RSModules: Environment Modules implementation in Rust

If you know of a module implementation project that's not listed here, please let us know so we can include it.