Environment Modules (software): Difference between revisions

Content deleted Content added
m Trimming #ShortDescription #Computing #Unix #VulcanSphere
 
(7 intermediate revisions by 2 users not shown)
Line 4:
| name = Environment Modules
| logo = Environment_Modules_logo.svg
| latest_release_version = 5.56.0
| latest_release_date = {{Start date and age|20242025|1107|1131}}
| operating_system = [[Unix-like]]
| programming_language = [[Tcl]]
Line 11:
| website = {{URL|https://modules.sourceforge.net/}}
}}
The '''Environment Modules''' system is a [[software tool]] designed to help users managedynamically modify their [[Unix]] or [[Linux]] [[shell (computing)|shell]] environment,. byIt allowingprovides groupsa ofmechanism relatedfor managing and switching between sets of [[environment- variable]] settings, often used to beconfigure madedifferent orsoftware removedpackages, dynamicallycompilers, and libraries.
 
== Overview ==
Environment Modules allows users to dynamically configure their shell environment without permanently altering login scripts. This is especially useful in [[high-performance computing]] (HPC) environments where users may need to access multiple versions of the same application. Users load and unload scripts called modulefiles to modify environment variables such as {{mono|PATH}} or {{mono|LD_LIBRARY_PATH}}.
 
Environment Modules is shell independent and supports all major Unix shells ([[Bash (Unix shell)|Bash]], [[KornShell|ksh]], [[Z shell|zsh]], [[Fish (Unix shell)|Fish]], [[Bourne shell|sh]], [[tcsh]], and [[C shell|csh]]), Windows shells ([[CMD.EXE]] and [[PowerShell]]) and several [[Scripting language|Scripting languages]] ([[Perl]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[Tcl]], [[CMake]] and [[R (programming language)|R]])
 
Environment Modules handles all kind of items part of shell environment, including [[environment variable]], [[Alias (command)|shell alias]], shell function and [[command-line completion]].
 
== Development ==
Modules has been around since the early 1990s<ref>{{cite journal |last=Furlani |first=John L. |date=September 30 – October 3, 1991 |title=Modules: Providing a Flexible User Environment |url=httphttps://modules.sourceforge.net/docs/Modules-Paper.pdf |journal=Proceedings of the Fifth Large Installation Systems Administration Conference (LISA V) |___location=San Diego, CA |pages=141–152 |access-date=9 February 2014}}</ref> and is used at some of the largest computer centers<ref>{{cite web|url=http://www.nics.tennessee.edu/computing-resources/kraken/modules |title=NICS User Support Kraken Modules Description |date=22 May 2011 |website=The National Institute for Computational Sciences (NICS) |publisher=Oak Ridge National Laboratory - Department of Energy |access-date=9 February 2014 |url-status=dead |archive-url=https://web.archive.org/web/20140222062335/http://www.nics.tennessee.edu/computing-resources/kraken/modules |archive-date=22 February 2014 }}</ref> to deploy multiple versions of different software tools to users. The [[National Energy Research Scientific Computing Center]] (NERSC) reports that they use Environment Modules to manage nearly all software.<ref>{{cite web |url=https://www.nersc.gov/users/software/nersc-user-environment/modules/ |title=NERSC Modules Software Environment |author=<!--Staff writer(s); no by-line.--> |date=2014-02-07 <!--15:11:50--> |website=The National Energy Research Scientific Computing Center (NERSC) |publisher=Office of Science - Department of Energy |access-date=19 February 2014}}</ref> Environment Modules is specified as a Baseline Configuration requirement of the [[DoD]] [[High Performance Computing Modernization Program]] (HPCMP)<ref>{{cite web|url=http://centers.hpc.mil/consolidated/bc/policies.php?choice=modules |title=Use of Modules for Accessing Multiple Versions of Software |date=20 Mar 2008 |website=Baseline Configuration |publisher=DoD High Performance Computing Modernization Program (HPCMP) |access-date=9 February 2014 |url-status=dead |archive-url=https://web.archive.org/web/20140222063501/http://centers.hpc.mil/consolidated/bc/policies.php?choice=modules |archive-date=22 February 2014 }}</ref> Project Baseline Configuration<ref>{{cite web|url=http://centers.hpc.mil/consolidated/bc/index.php |title=DoD High Performance Computing Modernization Program Baseline Configuration |website=Baseline Configuration |publisher=DoD High Performance Computing Modernization Program (HPCMP) |access-date=9 February 2014 |url-status=dead |archive-url=https://web.archive.org/web/20140222063504/http://centers.hpc.mil/consolidated/bc/index.php |archive-date=22 February 2014 }}</ref> team for participating DoD Supercomputing Resource Centers (DSRCs).
 
== Modulefiles ==
The modules system is based on modulefiles,<ref>{{cite web |url=httphttps://modules.sourceforgereadthedocs.netio/manen/stable/modulefile.html |title=modulefile - files containing Tcl code for the Modules package |authordate=John31 L. Furlani & Peter W. Osel |date=July 20092025 |website=SourceForgeRead |publisher=manthe pageDocs |access-date=9 February 2014}}</ref> which specify groups of environment settings that need to be made together. Modulefiles can be installed in a central ___location for general use, or in a user directory for personal use. Environment Modules modulefiles are written in the [[Tcl]] (Tool Command Language) and are interpreted by the modulecmd program via the module<ref>{{cite web |url=httphttps://modules.sourceforgereadthedocs.netio/manen/stable/module.html |title=module - command interface to the Modules package |authordate=John31 L. Furlani & Peter W. Osel |date=July 20092025 |website=SourceForgeRead |publisher=man page |access-date=9the FebruaryDocs 2014}}</ref> user interface.
 
The key advantage of Environment Modules is that it is shell independent and supports all major shells such as [[Bash (Unix shell)|Bash]] (bash), [[KornShell]] (ksh), [[Z shell]] (zsh), [[Fish (Unix shell)|Fish]] (fish), [[Bourne shell]] (sh), [[tcsh]], and [[C shell]] (csh). The second key advantage is that it allows to use multiple versions of the program or package from the same account by just loading proper module. Those two advantages were instrumental in making Environment Modules a part of most HPC cluster setups. It also inspired several alternative implementation such as lmod from University of Texas, which is written in [[Lua (programming language)|Lua]] instead of Tcl.
 
Modulefiles are created on per application per version basis. They can be dynamically loaded, unloaded, or switched. Along with the capability of using multiple versions of the same software it also can be used to implement site policies regarding the access and use of applications.
Line 181 ⟶ 188:
 
==== 8.6.1 version of Tcl built from /usr/local/src ====
Although the [[PCLinuxOS]] 64-bit repositories include Tcl they do not include a development package with the configuration files required to build Environment Modules on Linux from source. Building Tcl from source will make the required files available.<ref>{{cite web | url=httphttps://sourceforge.net/projects/tcl/files/Tcl/ | title=TCL - Browse /TCL at SourceForge.net }}</ref>
 
Extract source after downloading
Line 217 ⟶ 224:
* {{Official website|https://modules.sourceforge.net/}}
* {{GitHub|envmodules/modules}}
* John L. Furlani, [httphttps://modules.sourceforge.net/docs/Modules-Paper.pdf Modules: Providing a Flexible User Environment] ''Proceedings of the Fifth Large Installation Systems Administration Conference (LISA V)'', pp.&nbsp;141–152, San Diego, CA, September 30 - October 3, 1991.
* http://lmod.sourceforge.net - alternative implementation using Lua instead of Tcl
* http://www.lysator.liu.se/cmod/ - alternative implementation using C only
* [https://web.archive.org/web/20140203041538/http://rcc.its.psu.edu/user_guides/system_utilities/modules/ PennState Environment Modules User Guide]
* [httphttps://modules.sourceforge.net/docs/MC2_whitney_paper.pdf Drag your design environment kicking and screaming into the '90s with Modules!] - SNUB Boston 2001 - Erich Whitney, Axiowave Networks, Mark Sprague, ATI Research
* [https://web.archive.org/web/20150217180220/https://www.xsede.org/software-environments Xsede Software Environments]. The Extreme Science and Engineering Discovery Environment ― National Science Foundation
* [http://www.nics.tennessee.edu/computing-resources/modules NICS Modules Description] ― The National Institute for Computational Sciences at Oak Ridge National Laboratory ― Department of Energy
Line 229 ⟶ 236:
[[Category:Free software programmed in Tcl]]
[[Category:Unix software]]
[[Category:Science software]]
[[Category:System administration]]