Installing Modules on Unix¶
This document is an overview of building and installing Modules on a Unix system.
Requirements¶
Modules consists of one Tcl script so to run it from a user shell the only
requirement is to have a working version of tclsh (version 8.5 or later)
available on your system. tclsh is a part of Tcl
(http://www.tcl-lang.org/software/tcltk/).
To install Modules from a distribution tarball or a clone of the git
repository, a build step is there to tailor the modulecmd.tcl and the
initialization scripts to the chosen installation configuration and create the
documentation files. This build step requires the tools to be found on your
system:
bash
make
sed
runtest
When also installing Modules Tcl extension library (enabled by default), these additional tools are needed:
grep
gcc
tcl-devel >= 8.5
When installing from a distribution tarball, documentation is pre-built and scripts to configure Modules Tcl extension library build are already generated. Thus no additional software is required. When installing from a clone of the git repository or from a git archive export, documentation and scripts to prepare for compilation have to be built and the following tools are required:
autoconf
automake
autopoint
m4
python
sphinx >= 1.0
gzip
The following features of Modules rely on external tools. Default tool may be changed or their location on target system may be specified. Alternatively these features may also be disabled.
Feature option |
Default external tool |
Installation options |
|---|---|---|
pager |
|
|
logger |
|
|
tcl_linter |
|
|
Get Modules¶
Modules can usually be installed with the package manager of your Unix system.
It it is available by default on most Linux distributions, on OS X and
FreeBSD either
under the name of modules or environment-modules.
If you want to install Modules from sources, tarballs from all Modules' releases can be retrieved from one of the following link:
For instance to download then unpack the last release of Modules:
$ curl -LJO https://github.com/envmodules/modules/releases/download/v5.6.1/modules-5.6.1.tar.gz $ tar xfz modules-5.6.1.tar.gz
Installation instructions¶
The simplest way to build and install Modules is:
$ ./configure $ make $ make install
Some explanation, step by step:
cdto the directory containing the package's source code. Your system must have the above requirements installed to properly build scripts, and documentation if build occurs from a clone of the git repository.Type
./configureto adapt the installation for your system. At this step you can choose the installation paths and the features you want to enable in the initialization scripts (see Build and installation options section below for a complete overview of the available options)Type
maketo adapt scripts to the configuration, build Tcl extension library if enabled and build documentation if working from git repository.Optionally, type
make test QUICKTEST=1to run the lightweight version of the non-regression test suite.Type
make installto install modulecmd.tcl, initialization scripts and documentation.Optionally, type
make testinstallto run the installation test suite.You can remove the built files from the source code directory by typing
make clean. To also remove the files thatconfigurecreated, typemake distclean.
A default installation process like described above will install Modules
under /usr/local/Modules. You can change this with the --prefix
option. By default, /usr/local/Modules/modulefiles will be setup as
the default directory containing modulefiles. --modulefilesdir
option enables to change this directory location. For example:
$ ./configure --prefix=/usr/share/Modules \
--modulefilesdir=/etc/modulefiles
See Build and installation options section to discover all ./configure
option available.
Note
GNU Make is excepted to be used for this build and installation
process. On non-Linux systems, the gmake should be called instead of
make.
Enable Modules in shells¶
Shell initialization scripts should be adapted to enable Modules during their
startup. Enabling Modules means defining the module shell function and
applying its configuration.
An easy way to achieve that is to make Modules initialization scripts part of
the system-wide environment setup in /etc/profile.d.To do so, make a link
in this directory to the profile scripts that can be found in your Modules
installation init directory. For instance, if Modules has been installed in
/usr/share/modules:
$ ln -s /usr/share/modules/init/profile.sh /etc/profile.d/modules.sh $ ln -s /usr/share/modules/init/profile.csh /etc/profile.d/modules.csh
These profile scripts will automatically adapt to the kind of sh or
csh shell you are running.
Another approach is to get the Modules initialization script sourced from the
shell configuration startup file. For instance following line could be added
to the end of the ~/.bashrc file if running Bash shell:
. /usr/share/modules/init/bash
Beware that shells have multiple ways to initialize depending if they are a login shell or not and if they are launched in interactive mode or not.
Depending on your OS distribution system-wide profile scripts may be ignored
when initializing non-interactive shells. This is for instance the case on
Debian distribution and its derivatives like Ubuntu. On such system, Modules
initialization script should be sourced by shell initialization files to get
module function defined when executing a command through ssh or
running a script. Add the following code snippets to the initialization files
of the shell you use.
For Bash, update either system-wide (
/etc/bash.bashrcon Debian-like systems) or personal (~/.bashrc) initialization file:# enable module command in non-login shells if ! shopt -q login_shell; then . /usr/share/modules/init/bash fi
For Csh/Tcsh, add Modules initialization file into Csh rc directory (
/etc/csh/cshrc.don Debian-like systems):ln -s /usr/share/modules/init/csh /etc/csh/cshrc.d/modules
Or update personal (
~/.cshrc) initialization file:# enable module command in non-login shells if (! $?loginsh) then source /usr/share/modules/init/csh endif
For Zsh, update either system-wide (
/etc/zsh/zshenvon Debian-like systems) or personal (~/.zshenv) initialization file:# enable module command . /usr/share/modules/init/zsh
For Ksh, update personal (
~/.kshrc) initialization file:# enable module command . /usr/share/modules/init/ksh
For Fish, add Modules initialization file into Fish system-wide config directory (
/etc/fish/conf.d):ln -s /usr/share/modules/init/fish /etc/fish/conf.d/modules.fish
Or into Fish personal config directory (
~/.config/fish/conf.d):ln -s /usr/share/modules/init/fish ~/.config/fish/conf.d/modules.fish
Configuration¶
Once installed you should review and adapt the configuration to make it fit your needs. The following steps are provided for example. They are not necessarily mandatory as it depends of the kind of setup you want to achieve.
Define module paths to enable by default. Edit
initrcconfiguration file in the directory designated by the--etcdiroption or editmodulespathin the same directory.If you use
modulespathconfiguration file, add one line mentioning each modulefile directory:/path/to/regular/modulefiles /path/to/other/modulefiles
If you use
initrcconfiguration file, add one line mentioning each modulefile directory prefixed by themodule usecommand:module use /path/to/regular/modulefiles module use /path/to/other/modulefiles
In case both configuration files
initrcandmodulespathare present, Modules initialization process will first evaluatemodulespaththeninitrc.By default, the modulepaths specified on the
--with-modulepathinstallation option are automatically defined for use ininitrc(or inmodulespathif the--enable-modulespathinstallation option has been set).Note
If you have set
--with-initconf-intoinitdirto install the Modules initialization configurations in the configuration directory designated by the--initdiroption, the configuration filesinitrcandmodulespathare respectively namedmodulercand.modulespath.Define modulefiles to load by default. Edit
initrcconfiguration file. Modulefiles to load cannot be specified inmodulespathfile. Add there all the modulefiles you want to load by default at Modules initialization time.Add one line mentioning each modulefile to load prefixed by the
module loadcommand:module load foo module load bar
By default, the modules specified on the
--with-loadedmodulesinstallation option are automatically defined for load ininitrc.Alternatively, if users have module collections saved in their
HOMEdirectory, you may prefer restoring their default collection when Modules initializes rather loading the default module list:if {[is-saved default]} { module restore } else { module load foo module load bar }
In fact you can add to the
initrcconfiguration file any kind of supported module command, likemodule configcommands to tune module's default behaviors. This configuration way is recommended over directly modifying the shell initialization scripts.
See the Configuration options section to discover all Modules
config options available, their default value and the installation
options linked to them.
If you go through the above steps you should have a valid setup tuned to your needs. After that you still have to write modulefiles to get something to load and unload in your newly configured Modules setup. In case you want to achieve a specific setup, some additional steps may be required:
In case the configuration you expect cannot be achieved through the
initrcconfiguration file, you may review and tune the initialization scripts. These files are located in the directory designated by the--initdiroption. Beware that these scripts could be overwritten when upgrading to a newer version of Modules, so configuration should be done through theinitrcfile as far as possible.If you want to alter the way the
modulecmd.tclscript operates, thesiteconfig.tclscript may be used. This Tcl file is located in the directory designated by the--etcdiroption. Every time the module command is called, it executes themodulecmd.tclscript which in turns sources thesiteconfig.tclscript during its startup phase. The site-specific configuration script could override default configuration values and more largely could supersede all procedures defined inmodulecmd.tclto obtain specific behaviors.Prior running the module sub-command specified as argument, the
modulecmd.tclscript evaluates the global run-command files. These files are either thercfile in the directory designated by the--etcdiroption, the file(s) designated in theMODULERCFILEenvironment variable or the user-specific RC file located in$HOME/.modulerc. The RC files are modulefiles (limited to a subset of the modulefile Tcl commands) that could define global module aliases, virtual modules or module properties such as tags, forbidding rules, etc.Note
Run-command files are intended to set parameters for modulefiles, not to configure the module command itself.
To learn more about siteconfig and run-command files, see the Modulecmd startup section in module reference manual. You may also look at the available setup recipes to get concrete deployment examples of these files.
Upgrading¶
In case you want to upgrade a pre-existing Modules installation, it is suggested to:
Backup configuration files stored in etcdir (like
siteconfig.tclorinitrc);Remove previous Modules installation;
Install new Modules version;
Review specific configuration of previous installation and adapt configuration files of new version.
It is advised to look at the different documents describing changes and new features appearing between versions. By reading these documents you will be able to determine the specific configuration options to apply to satisfy your use cases.
In case you install Modules with the --enable-versioning option
set, you may be able to install a new version of Modules alongside existing
ones (if they also have been installed with this option set).
Build and installation options¶
Options available at the ./configure installation step are described
below. These options enable to choose the installation paths and the features
to enable or disable. You can also get a description of these options by
typing ./configure --help.
Fine tuning of the installation directories (the default value for each option is displayed within brackets):
- --bindir=DIR¶
Directory for executables reachable by users [
PREFIX/bin]
- --datarootdir=DIR¶
Base directory to set the man and doc directories [
PREFIX/share]
- --docdir=DIR¶
Directory to host documentation other than man pages like README, license file, etc [
DATAROOTDIR/doc]
- --emacsdatadir=DIR¶
Directory to host Emacs addon files [
DATAROOTDIR/emacs/lisp]Added in version 5.6.
- --etcdir=DIR¶
Directory for the executable configuration scripts [
PREFIX/etc]Added in version 4.1.
- --initdir=DIR¶
Directory for the per-shell environment initialization scripts [
PREFIX/init]
- --libdir=DIR¶
Directory for object code libraries like libtclenvmodules.so [
PREFIX/lib]
- --libexecdir=DIR¶
Directory for executables called by other executables like modulecmd.tcl [
PREFIX/libexec]
- --mandir=DIR¶
Directory to host man pages [
DATAROOTDIR/man]
- --modulefilesdir=DIR¶
Directory of main modulefiles also called system modulefiles [
PREFIX/modulefiles]Added in version 4.0.
- --nagelfardatadir=DIR¶
Directory to host Nagelfar linter addon files [
DATAROOTDIR/nagelfar]Added in version 5.2.
- --prefix=PREFIX¶
Installation root directory [
/usr/local/Modules]
- --vimdatadir=DIR¶
Directory to host Vim addon files [
DATAROOTDIR/vim/vimfiles]Added in version 4.3.
Optional Features (the default for each option is displayed within
parenthesis, to disable an option replace enable by disable for
instance --disable-set-manpath):
- --enable-advanced-version-spec¶
Activate the advanced module version specifiers which enables to finely select module versions by specifying after the module name a version constraint prefixed by the
@character. This option also allows to specify module variants. (default=yes)This installation option defines the default value of the
advanced_version_specconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.4.
Changed in version 5.0: Configuration option default set to
yes
- --enable-append-binpath¶
Append rather prepend binary directory to the PATH environment variable when the
--enable-set-binpathoption is enabled. (default=no)Added in version 4.2.
- --enable-append-manpath¶
Append rather prepend man page directory to the MANPATH environment variable when the
--enable-set-manpathoption is enabled. (default=no)Added in version 4.2.
- --enable-auto-handling¶
Set modulecmd.tcl to automatically apply automated modulefiles handling actions, like loading the pre-requisites of a modulefile when loading this modulefile. (default=yes)
This installation option defines the default value of the
auto_handlingconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.2.
Changed in version 5.0: Configuration option default set to
yes
- --enable-avail-indepth¶
When performing an
availsub-command, include in search results the matching modulefiles and directories and recursively the modulefiles and directories contained in these matching directories when enabled or limit search results to the matching modulefiles and directories found at the depth level expressed by the search query if disabled. (default=yes)This installation option defines the default value of the
avail_indepthconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --enable-color¶
Control if output should be colored by default or not. A value of
yesequals to theautocolor mode.noequals to thenevercolor mode. (default=yes)This installation option defines the default value of the
colorconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
Changed in version 5.0: Configuration option default set to
yes
- --enable-compressed-changelog¶
Control if
ChangeLogdocumentation file should be installed in a compressed format or not. (default=yes)Added in version 5.7.
- --enable-conflict-unload¶
Apply automated unload of conflicting modulefiles when loading a module. (default=no)
This installation option defines the default value of the
conflict_unloadconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.5.
- --enable-doc-install¶
Install the documentation files in the documentation directory defined with the
--docdiroption. This feature has no impact on manual pages installation. Disabling documentation file installation is useful in case of installation process handled via a package manager which handles by itself the installation of this kind of documents. (default=yes)Added in version 4.0.
- --enable-emacs-addons¶
Install the Emacs addon files in the Emacs addons directory defined with the
--emacsdatadiroption. (default=yes)Added in version 5.6.
- --enable-example-modulefiles¶
Install some modulefiles provided as example in the system modulefiles directory defined with the
--modulefilesdiroption. (default=yes)Added in version 4.0.
- --enable-extended-default¶
Allow to specify module versions by their starting part, i.e. substring separated from the rest of the version string by a
.character. (default=yes)This installation option defines the default value of the
extended_defaultconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.4.
Changed in version 5.0: Configuration option default set to
yes
- --enable-implicit-default¶
Define an implicit default version, for modules with none explicitly defined, to select when the name of the module to evaluate is passed without the mention of a specific version. When this option is disabled the name of the module passed for evaluation should be fully qualified elsewhere an error is returned. (default=yes)
This installation option defines the default value of the
implicit_defaultconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --enable-implicit-requirement¶
Implicitly define a prereq or a conflict requirement toward modules specified respectively on
module loadormodule unloadcommands in modulefile. (default=yes)This installation option defines the default value of the
implicit_requirementconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
- --enable-libtclenvmodules¶
Build and install the Modules Tcl extension library which provides optimized Tcl commands for the modulecmd.tcl script. (default=yes)
Added in version 4.3.
- --enable-mcookie-version-check¶
Enable check of the version specified right after Modules magic cookie (i.e.,
#%Modulefile signature) in modulefiles, which defines the minimal version of the Modules tool to use in order to evaluate the modulefile. (default=yes)This installation option defines the default value of the
mcookie_version_checkconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
- --enable-ml¶
Define the ml command, a handy frontend to the module command, when Modules initializes. (default=yes)
This installation option defines the default value of the
mlconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.5.
- --enable-modulespath, --enable-dotmodulespath¶
Set the module paths defined by
--with-modulepathoption in amodulespathfile (following C version fashion) within the initialization directory defined by the--etcdiroption rather than within theinitrcfile. Or respectively, if option--with-initconf-inhas been set toinitdir, in a.modulespathfile within the configuration directory defined by the--initdiroption rather than within themodulercfile. (default=no)Added in version 4.0.
Changed in version 4.3: Option
--enable-modulespathadded
- --enable-multilib-support¶
Support multilib systems by looking in modulecmd.tcl at an alternative location where to find the Modules Tcl extension library depending on current machine architecture. (default=no)
Added in version 4.6.
- --enable-nagelfar-addons¶
Install the Nagelfar linter addon files (syntax databases and plugins to lint modulefiles and modulercs) in the Nagelfar addons directory defined with the
--nagelfardatadiroption. (default=yes)Added in version 5.2.
- --enable-new-features¶
Enable all new features that are disabled by default due to the substantial behavior changes they imply on Modules 5. This option is equivalent to the cumulative use of
--with-abort-on-error=load:ml:reload:switch,--enable-conflict-unloadand--enable-require-via. (default=no)Added in version 4.7.
Changed in version 5.0: Configuration option has been reset following major version change as
--enable-auto-handling,--enable-color,--with-icase=search,--enable-extended-defaultand--enable-advanced-version-specare set by default on Modules 5.Changed in version 5.5: Enables automated conflict unload mechanism
Changed in version 5.6: Enables automated require via mechanism
- --enable-paginate¶
Control if output of module command should be piped into a pager by default or not. (default=yes)
Added in version 5.7.
- --enable-path-entry-reorder¶
Change order of entry in a path-like environment variable, when
prepend-path,append-pathorusetarget a path entry that is already defined in the environment variable. (default=no)This installation option defines the default value of the
path_entry_reorderconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.7.
- --enable-quarantine-support¶
Generate code in module function definition to add support for the environment variable quarantine mechanism (default=no)
This installation option defines the default value of the
quarantine_supportconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.1.
Changed in version 5.0: Configuration option default set to
no
- --enable-require-via¶
Consider loaded module that enables a modulepath, a requirement of loaded modules stored in this modulepath. (default=no)
This installation option defines the default value of the
require_viaconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.6.
- --enable-set-binpath¶
Prepend binary directory defined by the
--bindiroption to the PATH environment variable in the shell initialization scripts. (default=yes)Added in version 4.0.
- --enable-set-manpath¶
Prepend man page directory defined by the
--mandiroption to the MANPATH environment variable in the shell initialization scripts. (default=yes)Added in version 4.0.
- --enable-set-shell-startup¶
Set when module function is defined the shell startup file to ensure that the module function is still defined in sub-shells. (default=no)
This installation option defines the default value of the
set_shell_startupconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
Changed in version 5.0: Configuration option default set to
no
- --enable-silent-shell-debug-support¶
Generate code in module function definition to add support for silencing shell debugging properties (default=no)
This installation option defines the default value of the
silent_shell_debugconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.2.
Changed in version 5.0: Configuration option default set to
no
- --enable-source-cache¶
Cache content of files evaluated through source(n) Tcl command in modulefile. When same file is sourced multiple times, cached content is reused rather reading file again.
This installation option defines the default value of the
source_cacheconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.4.
- --enable-spider-indepth¶
When performing an
spidersub-command, include in search results the matching modulefiles and directories and recursively the modulefiles and directories contained in these matching directories when enabled or limit search results to the matching modulefiles and directories found at the depth level expressed by the search query if disabled. (default=yes)This installation option defines the default value of the
spider_indepthconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.6.
- --enable-versioning¶
Append Modules version to installation prefix and deploy a
versionsmodulepath shared between all versioning enabled Modules installation. A modulefile corresponding to Modules version is added to the shared modulepath and enables to switch from one Modules version to another. (default=no)
- --enable-unique-name-loaded¶
Only allow one module loaded per module name. A conflict is raised when loading a module whose name or alternative names are shared by an already loaded module. (default=no)
This installation option defines the default value of the
unique_name_loadedconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.4.
- --enable-vim-addons¶
Install the Vim addon files in the Vim addons directory defined with the
--vimdatadiroption. (default=yes)Added in version 4.3.
- --enable-wa-277¶
Activate workaround for issue #277 related to Tcsh history mechanism which does not cope well with default module alias definition. Note that enabling this workaround solves Tcsh history issue but weakens shell evaluation of the code produced by modulefiles. (default=no)
This installation option defines the default value of the
wa_277configuration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --enable-windows-support¶
Install all required files for Windows platform (module, ml and envml command batch file and
cmd.cmdinitialization script). (default=no)Added in version 4.5.
Optional Packages (the default for each option is displayed within
parenthesis, to disable an option replace with by without for
instance --without-modulepath):
- --with-abort-on-error=LIST¶
When evaluating multiple modulefiles, if one fails abort evaluation sequence and withdraw already evaluated modulefiles for listed module sub-commands. Sub-commands accepted in LIST are:
load, ml,mod-to-sh,purge,reload,switch,switch_unload,try-loadandunload(elements in LIST are separated by:). (default=ml:reload:switch_unload)This installation option defines the default value of the
abort_on_errorconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.4.
- --with-avail-output=LIST¶
Specify the content to report on avail sub-command regular output in addition to the available module names. Elements accepted in LIST are:
modulepath,alias,provided-alias,dirwsym,indesym,sym,tag,key,hidden,variant,variantifspecandvia(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=modulepath:alias:dirwsym:sym:tag:variantifspec:key)This installation option defines the default value of the
avail_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
Changed in version 5.3: Element
variantaddedChanged in version 5.3: Element
variantifspecadded and set by defaultChanged in version 5.3.1: Element
indesymaddedChanged in version 5.6: Elements
hidden,provided-aliasandviaadded
- --with-avail-terse-output=LIST¶
Specify the content to report on avail sub-command terse output in addition addition to the available module names. Elements accepted in LIST are:
modulepath,alias,provided-alias,dirwsym,indesym,sym,tag,key,hidden,variantandvariantifspec(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=modulepath:alias:dirwsym:sym:tag:variantifspec)This installation option defines the default value of the
avail_terse_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
Changed in version 5.3: Element
variantaddedChanged in version 5.3: Element
variantifspecadded and set by defaultChanged in version 5.3.1: Element
indesymaddedChanged in version 5.6: Elements
hiddenandprovided-aliasadded
- --with-bashcompletiondir=DIR¶
Directory for Bash completion scripts. When this option is not set Bash completion script for Modules is installed in the initialization script directory and is sourced from Modules Bash initialization script. (default=)
Added in version 5.1.
- --with-bin-search-path=PATHLIST¶
List of paths to look at when searching the location of tools required to build and configure Modules (default=
/usr/bin:/bin:/usr/local/bin)Added in version 4.2.
- --with-dark-background-colors=SGRLIST¶
Default color set to apply if terminal background color is defined to
dark. SGRLIST follows the same syntax than used inLS_COLORS. Each element in SGRLIST is an output item associated to a Select Graphic Rendition (SGR) code. Elements in SGRLIST are separated by:. Output items are designated by keys.Items able to be colorized are: highlighted element (
hi), debug information (db), trace information (tr) tag separator (se); Error (er), warning (wa), module error (me) and info (in) message prefixes; Modulepath (mp), directory (di), module alias (al), module variant (va), module symbolic version (sy) and moduledefaultversion (de).Module tags can also be colorized. The key to set in the color palette to get a graphical rendering of a tag is the tag name or the tag abbreviation if one is defined for tag. The SGR code applied to a tag name is ignored if an abbreviation is set for this tag thus the SGR code should be defined for this abbreviation to get a graphical rendering. Each basic tag has by default a key set in the color palette, based on its abbreviated string: auto-loaded (
aL), forbidden (F), hidden and hidden-loaded (H), loaded (L), nearly-forbidden (nF), sticky (S), super-sticky (sS), keep-loaded (kL) and warning (W).For a complete SGR code reference, see https://en.wikipedia.org/wiki/ANSI_escape_code#Select_Graphic_Rendition_parameters. (default=
hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=31;43:S=46:sS=44:kL=30;48;5;109:W=30;43)This installation option defines the default value of the
colorsconfiguration option whenterm_backgroundconfiguration option equalsdark.colorscould be changed after installation with theconfigsub-command.Added in version 4.3.
Changed in version 4.6: Output item for trace information (
tr) addedChanged in version 4.7: Output items for module tags auto-loaded (
aL), forbidden (F), hidden and hidden-loaded (H), loaded (L), nearly-forbidden (nF), sticky (S) and super-sticky (sS) addedChanged in version 4.8: Output item for module variant (
va) addedChanged in version 5.1: Output item for keep-loaded module tag (
kL) addedChanged in version 5.6: Output item for warning module tag (
W) addedChanged in version 5.6: Default
nearly-forbiddentag color changed
- --with-editor=BIN¶
Name or full path of default editor program to use to open modulefile through the
editsub-command. (default=vi)This installation option defines the default value of the
editorconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.8.
- --with-fishcompletiondir=DIR¶
Directory for Fish completion scripts. When this option is not set Fish completion script for Modules is installed in the initialization script directory and is sourced from Modules Fish initialization script. (default=)
Added in version 5.1.
- --with-icase=VALUE¶
Apply a case insensitive match to module specification on
avail,whatisandpathssub-commands (when set tosearch) or on all module sub-commands and modulefile Tcl commands for the module specification they receive as argument (when set toalways). Case insensitive match is disabled when this option is set tonever. (default=search)This installation option defines the default value of the
icaseconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.4.
Changed in version 5.0: Configuration option default set to
search
- --with-initconf-in=VALUE¶
Location where to install Modules initialization configuration files. Either
initdiroretcdir(default=etcdir)Added in version 4.1.
Changed in version 5.0: Configuration option default set to
etcdir
- --with-light-background-colors=SGRLIST¶
Default color set to apply if terminal background color is defined to
light. Expect the same syntax than described for--with-dark-background-colors. (default=hi=1:db=2:tr=2:se=2:er=31:wa=33:me=35:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2:F=101:nF=91;103:S=106:sS=104:kL=48;5;109:W=103)This installation option defines the default value of the
colorsconfiguration option whenterm_backgroundconfiguration option equalslight.colorscould be changed after installation with theconfigsub-command.Added in version 4.3.
Changed in version 4.6: Output item for trace information (
tr) addedChanged in version 4.7: Output items for module tags auto-loaded (
aL), forbidden (F), hidden and hidden-loaded (H), loaded (L), nearly-forbidden (nF), sticky (S) and super-sticky (sS) addedChanged in version 4.8: Output item for module variant (
va) addedChanged in version 5.1: Output item for keep-loaded module tag (
kL) addedChanged in version 5.6: Output item for warning module tag (
W) addedChanged in version 5.6: Default
nearly-forbiddentag color changed
- --with-list-output=LIST¶
Specify the content to report on list sub-command regular output in addition to the loaded module names. Elements accepted in LIST are:
header,idx,variant,alias,indesym,sym,tag,hiddenandkey(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=header:idx:variant:sym:tag:key)This installation option defines the default value of the
list_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
Changed in version 4.8: Element
variantadded and set by defaultChanged in version 5.4: Elements
aliasandindesymaddedChanged in version 5.6: Element
hiddenadded
- --with-list-terse-output=LIST¶
Specify the content to report on list sub-command terse output in addition to the loaded module names. Elements accepted in LIST are:
header,idx,variant,alias,indesym,sym,tag,hiddenandkey(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=header)This installation option defines the default value of the
list_terse_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
Changed in version 4.8: Element
variantaddedChanged in version 5.4: Elements
aliasandindesymaddedChanged in version 5.6: Element
hiddenadded
- --with-loadedmodules=MODLIST¶
Default modulefiles to load at Modules initialization time. Each modulefile in this list should be separated by
:. Defined value is registered in theinitrcconfiguration file or in themodulercfile if--with-initconf-inis set toinitdir. (default=)Added in version 4.0.
- --with-locked-configs=CONFIGLIST¶
Ignore environment variable superseding value for the listed configuration options. Accepted option names in CONFIGLIST are
extra_siteconfig,implicit_default,logged_eventsandlogger(each option name should be separated by whitespace character). (default=)This installation option defines the default value of the
locked_configsconfiguration option which cannot not be changed after installation.Added in version 4.3.
Changed in version 5.5: Configs
logged_eventsandloggeradded
- --with-logged-events=EVENTLIST¶
Events to log. Accepted event names in EVENTLIST are
auto_eval,requested_evalandrequested_cmd(each event name in this list should be separated by:). The order of the elements in EVENTLIST does not matter. (default=)This installation option defines the default value of the
logged_eventsconfiguration option which cannot not be changed after installation.Added in version 5.5.
- --with-logger=BIN¶
Name or full path of default logger program to use to log information (can be superseded at run-time by environment variable) (default=
logger)This installation option and
--with-logger-optsdefine the default value of theloggerconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.5.
- --with-logger-opts=OPTLIST¶
Settings to apply to default logger program (default=
-t modules)This installation option and
--with-loggerdefine the default value of theloggerconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.5.
- --with-modulepath=PATHLIST¶
Default path list to setup as the default modulepaths. Each path in this list should be separated by
:. Defined value is registered in theinitrcormodulespathconfiguration file, depending on the--enable-modulespathoption. These files are respectively calledmodulercand.modulespathif--with-initconf-inis set toinitdir. The path list value is read at initialization time to populate the MODULEPATH environment variable. By default, this modulepath is composed of the directory set for the system modulefiles (default=PREFIX/modulefilesorBASEPREFIX/$MODULE_VERSION/modulefilesif versioning installation mode enabled)Added in version 4.0.
- --with-moduleshome¶
Location of the main Modules package file directory (default=
PREFIX)This installation option defines the default value of the
homeconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.4.
- --with-nearly-forbidden-days=VALUE¶
Define the number of days a module is considered nearly forbidden prior reaching its expiry date. VALUE should be an integer comprised between 0 and 365. (default=
14)This installation option defines the default value of the
nearly_forbidden_daysconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.6.
- --with-pager=BIN¶
Name or full path of default pager program to use to paginate informational message output (can be superseded at run-time by environment variable) (default=
less)This installation option and
--with-pager-optsdefine the default value of thepagerconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.1.
- --with-pager-opts=OPTLIST¶
Settings to apply to default pager program (default=
-eFKRX)This installation option and
--with-pagerdefine the default value of thepagerconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.1.
- --with-python=BIN¶
Name or full path of Python interpreter command to set as shebang for helper scripts. (default=
python)Added in version 4.5.
- --with-quarantine-vars=<VARNAME[=VALUE] ...>¶
Environment variables to put in quarantine when running the module command to ensure it a sane execution environment (each variable should be separated by space character). A value can eventually be set to a quarantine variable instead of emptying it. (default=)
This installation option defines the default value of the
MODULES_RUN_QUARANTINEandMODULES_RUNENV_<VAR>environment variables which could be changed after installation with theconfigsub-command onrun_quarantineconfiguration option.Added in version 4.1.
- --with-search-match=VALUE¶
When searching for a module with
availsub-command, match query string against module name start (starts_with) or any part of module name string (contains). (default=starts_with)This installation option defines the default value of the
search_matchconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --with-spider-output=LIST¶
Specify the content to report on spider sub-command regular output in addition to the available module names. Elements accepted in LIST are:
modulepath,alias,provided-alias,dirwsym,indesym,sym,tag,key,hidden,variant,variantifspecandvia(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=modulepath:alias:dirwsym:sym:tag:variantifspec:via:key)This installation option defines the default value of the
spider_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.6.
- --with-spider-terse-output=LIST¶
Specify the content to report on spider sub-command terse output in addition addition to the available module names. Elements accepted in LIST are:
modulepath,alias,provided-alias,dirwsym,indesym,sym,tag,key,hidden,variantandvariantifspec(elements in LIST are separated by:). The order of the elements in LIST does not matter. (default=modulepath:alias:dirwsym:sym:tag:variantifspec)This installation option defines the default value of the
spider_terse_outputconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.6.
- --with-sticky-purge=VALUE¶
When unloading a sticky or super-sticky module during a module purge, raise an
erroror emit awarningmessage or besilent. (default=error)This installation option defines the default value of the
sticky_purgeconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.4.
- --with-tag-abbrev=ABBRVLIST¶
Define the abbreviation to use when reporting each module tag. Each element in ABBRVLIST is a tag name associated to an abbreviation string (elements in ABBRVLIST are separated by
:). (default=auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL:warning=W)This installation option defines the default value of the
tag_abbrevconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
Changed in version 5.1: Abbreviation for
keep-loadedtag addedChanged in version 5.6: Abbreviation for
warningtag added
- --with-tag-color-name=TAGLIST¶
Define the tags whose graphical rendering should be applied over their name instead of over the name of the module they are attached to. Each element in TAGLIST is a tag name or abbreviation (elements in TAGLIST are separated by
:). (default=)This installation option defines the default value of the
tag_color_nameconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.7.
- --with-tcl¶
Directory containing the Tcl configuration script
tclConfig.sh. Useful to compile Modules Tcl extension library if this file cannot be automatically found in default locations.
- --with-tclinclude¶
Directory containing the Tcl header files. Useful to compile Modules Tcl extension library if these headers cannot be automatically found in default locations.
- --with-tclsh=BIN¶
Name or full path of Tcl interpreter shell (default=
tclsh)Added in version 4.0.
- --with-tcl-linter=BIN¶
Name or full path of program to use to lint modulefile through the
lintsub-command. (default=nagelfar.tcl)This installation option and
--with-tcl-linter-optsdefine the default value of thetcl_linterconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.2.
- --with-tcl-linter-opts=OPTLIST¶
Settings to apply to Tcl linter program (default=)
This installation option and
--with-tcl-linterdefine the default value of thetcl_linterconfiguration option which could be changed after installation with theconfigsub-command.Added in version 5.2.
- --with-terminal-background=VALUE¶
The terminal background color that determines the color set to apply by default between the
darkbackground colors or thelightbackground colors (default=dark)This installation option defines the default value of the
term_backgroundconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --with-unload-match-order=VALUE¶
When unloading a module if multiple loaded modules match the request, unload module loaded first (
returnfirst) or module loaded last (returnlast) (default=returnlast)This installation option defines the default value of the
unload_match_orderconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --with-variant-shortcut=SHORTCUTLIST¶
Define the shortcut characters that could be used to specify variant names. Each element in SHORTCUTLIST is a variant name associated to a shortcut character (e.g.,
foo=%). Shortcuts cannot exceed a length of 1 character and cannot be alphanumeric characters ([A-Za-z0-9]) or characters with already a special meaning ([+~/@=-]). Elements in SHORTCUTLIST are separated by:. (default=)This installation option defines the default value of the
variant_shortcutconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.8.
- --with-verbosity=VALUE¶
Specify default message verbosity. accepted values are
silent,concise,normal,verbose,verbose2,trace,debuganddebug2. (default=normal)This installation option defines the default value of the
verbosityconfiguration option which could be changed after installation with theconfigsub-command.Added in version 4.3.
- --with-zshcompletiondir=DIR¶
Directory for Zsh completion scripts. When this option is not set Zsh completion script for Modules is installed in the initialization script directory and
FPATHis set in Zsh initialization script to point to this location. (default=)Added in version 5.1.
Configuration options¶
Options available through the config sub-command are described
below. In addition to their default value, the related installation option,
environment variable and command-line switch are listed for each configuration
option. This table also describes if each configuration option needs to be set
prior or during Modules initialization and if it can be modified after
installation.
Configuration option |
Default value |
Related installation option, environment variable and command-line switch |
Set prior or during initialization |
Cannot be altered |
|---|---|---|---|---|
|
||||
|
|
|||
|
|
|||
|
|
|||
modulepath:alias:dirwsym:sym:tag:variantifspec:key |
||||
modulepath:alias:dirwsym:sym:tag:variantifspec |
|
|||
|
||||
|
||||
|
||||
|
||||
Unset by default |
||||
|
||||
hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=31;43:S=46:sS=44:kL=30;48;5;109:W=30;43 |
|
|||
|
||||
|
||||
|
||||
|
||||
Unset by default |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
X |
|||
|
||||
|
||||
|
||||
|
|
|||
Empty by default |
X |
|||
Empty by default |
||||
|
||||
|
||||
|
|
|||
|
X |
|||
|
||||
Empty by default |
||||
|
||||
|
||||
|
||||
Unset by default |
||||
|
X |
|||
Unset by default |
||||
|
||||
|
||||
|
||||
Empty by default |
||||
|
|
|||
|
X |
|||
Empty by default |
X |
|||
|
|
X |
||
|
X |
|||
|
||||
|
|
|||
modulepath:alias:dirwsym:sym:tag:variantifspec:via:key |
||||
modulepath:alias:dirwsym:sym:tag:variantifspec |
|
|||
|
||||
auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL:warning=W |
||||
Empty by default |
||||
|
X |
|||
|
|
|||
|
||||
|
||||
|
||||
|
||||
Empty by default |
||||
|
|
|||
|
X |