Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TACC/Lmod
Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
https://github.com/TACC/Lmod
environment-modules hpc lmod lua tacc xsede
Last synced: 3 months ago
JSON representation
Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
- Host: GitHub
- URL: https://github.com/TACC/Lmod
- Owner: TACC
- License: other
- Created: 2013-04-11T22:17:13.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T14:58:24.000Z (4 months ago)
- Last Synced: 2024-08-01T16:52:33.475Z (4 months ago)
- Topics: environment-modules, hpc, lmod, lua, tacc, xsede
- Language: Lua
- Homepage: http://lmod.readthedocs.org
- Size: 34.6 MB
- Stars: 477
- Watchers: 23
- Forks: 122
- Open Issues: 26
-
Metadata Files:
- Readme: README.design.md
- License: License
Awesome Lists containing this project
README
Lmod design
===========The style of variables is:
`varT`: a table
`varA`: an arraySpider
------Spider searches for module(names). There are 3 levels of spider:
- level 0: just list all modules, no input given
- level 1: search for a module with a given name
- level 2: search for a module with a given name/versionLevel 2 will show how to load the specified module in a hierarchy.
`canonical`: the version according to Lmod
`Version`: the version specify by whatis in the module (can be anything)
`pv`: Python version (used to determine the latest version)
`wv`: weighted version (user, system and module locale .modulerc)
`luaExt`: location of the .lua in the filename (zero when tcl module)MainControl
--------------The MainControl is the heart of Lmod. An 'action' in a module file like `setenv('foo', 'bar')` has a different
meaning depending on the mode. For a load it will set `foo` while for a unload it will delete it.
There are 7 modes in Lmod:
- Load
- Unload
- Access: for help and whatis messages
- CheckSyntax: check if the module file is a valid module (a dummy run)
- ComputeHash: generate a hash value for the contents of the module
- DependencyCk: check if all 'depends_on' are still valid after a unload
- MgrLoad: for a collection restore (loads are ignored)
- Refresh: reloads the modules to make sure all shell functions and aliases are defined
- Show: show the contents of the module
- Spider: process module files for spider operationsThe file `MainControl.lua` holds all code and the files `MC_.lua` assign what each action in a
module exactly does.The object MCP (MainControl Program) is created once and always points to a 'positive'
action (a load basically). The lowercase mcp points to the current MainControl
Program. These variables are global.The file `Hub.lua` is were the real work is being done. MainControl will decides which functions
get called from this file.General flow
------------The Lmod main is in `lmod.lua.in`. There the MainControl Program (MCP) object is created. The array
`lmodCmdA` does the translation between user input and a Lmod command. The file `cmdfuncs.lua` holds
all 'user' actions. The main will run a function from that file which will call MainControl which
calls Hub (or sometimes Hub directly).