|
| 1 | +.. _other-implementations: |
| 2 | + |
| 3 | +Other ``module`` implementations |
| 4 | +================================ |
| 5 | + |
| 6 | +Since the inception of the Environment Modules project in 1991, the ``module`` |
| 7 | +command has become a de facto standard interface for dynamically modifying a |
| 8 | +user's environment via modulefiles. Over time, several alternative |
| 9 | +implementations of the ``module`` command have been developed. |
| 10 | + |
| 11 | +This document provides an overview of known ``module`` command |
| 12 | +implementations, with a particular focus on Lmod, the most widely adopted |
| 13 | +alternative. The goal is to inform users and developers of the current |
| 14 | +landscape of ``module`` system tools. |
| 15 | + |
| 16 | +Lmod |
| 17 | +---- |
| 18 | + |
| 19 | +`Lmod`_ is an implementation of Environment Modules written in Lua. Its |
| 20 | +development started in 2008 and along a years Lmod has introduced many new |
| 21 | +features into the ``module`` world: software hierarchy, cache mechanism, Lua |
| 22 | +modulefile support, ``ml`` command, etc. |
| 23 | + |
| 24 | +Lmod gained popularity in the mid-2010s, during a period when the Modules |
| 25 | +project was largely inactive. It is now widely adopted, particularly in the |
| 26 | +HPC community. |
| 27 | + |
| 28 | +.. _Lmod: https://github.com/TACC/Lmod/ |
| 29 | + |
| 30 | +Today, Lmod and Modules offer broadly similar feature sets. The following |
| 31 | +table highlights features that are unique to each implementation. |
| 32 | + |
| 33 | ++---------------------------------------------+---------------------------------------------+ |
| 34 | +| Lmod (``8.8``) | Modules (``5.6``) | |
| 35 | ++---------------------------------------------+---------------------------------------------+ |
| 36 | +| * Integration with *rc* shell and *json* | * Integration with *cmd* and *pwsh* shells | |
| 37 | +| structured output | and *Tcl* language | |
| 38 | +| * `Lua modulefile support`_ | * :envvar:`Automated module handling | |
| 39 | +| * `Module hierarchy`_ | <MODULES_AUTO_HANDLING>` | |
| 40 | +| * Save configuration under | * :ref:`Advanced module version specifiers` | |
| 41 | +| :envvar:`XDG_CONFIG_HOME` | * :ref:`Module variants` | |
| 42 | +| * `i18n`_ | * :ref:`Virtual modules` | |
| 43 | +| * `Find best module`_ | * :ref:`Sourcing modulefiles` | |
| 44 | +| * `Path entry priorities`_ | * Handle modulefile outside modulepath | |
| 45 | +| | * :ref:`Quarantine mechanism` | |
| 46 | +| | * :ref:`Case insensitive module | |
| 47 | +| | load<Insensitive case>` | |
| 48 | +| | * Automatic ``latest`` and ``loaded`` | |
| 49 | +| | symbols | |
| 50 | +| | * ``alias``, ``command``, ``loaded``, | |
| 51 | +| | ``tags``, ``usergroups`` and ``username`` | |
| 52 | +| | sub-commands of :mfcmd:`module-info` | |
| 53 | +| | * :ref:`Super-sticky modules<Sticky | |
| 54 | +| | modules>` | |
| 55 | +| | * :option:`Fine-tuned output | |
| 56 | +| | configuration<--output>` | |
| 57 | +| | * :ref:`Editing modulefiles` | |
| 58 | +| | * :ref:`Tag when loading module<More | |
| 59 | +| | tagging capabilities>` | |
| 60 | +| | * :ref:`Stashing environment` | |
| 61 | +| | * :ref:`Extra specifier` | |
| 62 | +| | * Configurable :ref:`Abort on error` | |
| 63 | +| | behavior | |
| 64 | +| | * Integration with *bash-eval* and *fish* | |
| 65 | +| | shells in :mfcmd:`source-sh` | |
| 66 | +| | * :ref:`Specific modulepath for | |
| 67 | +| | requirements` | |
| 68 | +| | * :ref:`Logging activity` | |
| 69 | ++---------------------------------------------+---------------------------------------------+ |
| 70 | + |
| 71 | +.. _Module hierarchy: https://lmod.readthedocs.io/en/latest/080_hierarchy.html |
| 72 | +.. _Lua modulefile support: https://lmod.readthedocs.io/en/latest/050_lua_modulefiles.html |
| 73 | +.. _Find best module: https://lmod.readthedocs.io/en/latest/060_locating.html |
| 74 | +.. _i18n: https://lmod.readthedocs.io/en/latest/185_localization.html |
| 75 | +.. _Path entry priorities: https://lmod.readthedocs.io/en/latest/077_ref_counting.html#specifying-priorities-for-path-entries |
| 76 | + |
| 77 | +Other alternatives |
| 78 | +------------------ |
| 79 | + |
| 80 | +This section intends to reference all other existing alternative ``module`` |
| 81 | +implementations. |
| 82 | + |
| 83 | +* `Modulecmd.py`_: Environment Modules implementation in Python |
| 84 | +* `Pmodules`_: Environment Modules implementation in Bash |
| 85 | +* `RSModules`_: Environment Modules implementation in Rust |
| 86 | + |
| 87 | +.. _Modulecmd.py: https://github.com/tjfulle/Modulecmd.py |
| 88 | +.. _Pmodules: https://gitlab.psi.ch/Pmodules |
| 89 | +.. _RSModules: https://github.com/fretn/rsmodules |
| 90 | + |
| 91 | +If you know of a ``module`` implementation project that's not listed here, |
| 92 | +please :ref:`let us know<Community>` so we can include it. |
| 93 | + |
| 94 | +Related projects |
| 95 | +---------------- |
| 96 | + |
| 97 | +Beyond alternative implementations of the ``module`` command, several projects |
| 98 | +have been developed along the years to extend its functionality or provide |
| 99 | +additional tools that enhance how modulefiles are handled. |
| 100 | + |
| 101 | +* `Devel::IPerl::Plugin::EnvironmentModules`_: interact with Environment |
| 102 | + Modules in a Jupyter IPerl kernel |
| 103 | +* `Env::Modulecmd`_: interface to ``modulecmd`` from Perl |
| 104 | +* `environmentmodules`_: Python interface for Environment Modules |
| 105 | +* `flavours`_: extension built on top of Modules v3 to provide module auto |
| 106 | + handling mechanisms |
| 107 | +* `Mii`_: a smart search engine for module environments |
| 108 | +* `RenvModule`_: interface to Environment Modules within the R environment |
| 109 | + |
| 110 | +.. _Devel\:\:IPerl\:\:Plugin\:\:EnvironmentModules: https://github.com/kiwiroy/Devel-IPerl-Plugin-EnvironmentModules |
| 111 | +.. _Env\:\:Modulecmd: https://metacpan.org/pod/Env::Modulecmd |
| 112 | +.. _environmentmodules: https://github.com/ben-albrecht/environmentmodules |
| 113 | +.. _flavours: https://sourceforge.net/projects/flavours/ |
| 114 | +.. _Mii: https://github.com/codeandkey/mii |
| 115 | +.. _RenvModule: https://cran.r-project.org/web/packages/RenvModule/index.html |
| 116 | + |
| 117 | +If you're aware of a ``module``-related project missing from this list, feel |
| 118 | +free to :ref:`contact us<Community>` so we can add it. |
0 commit comments