1MODULE(1)                           Modules                          MODULE(1)
2
3
4

NAME

6       module - command interface to the Modules package
7

SYNOPSIS

9       module [switches] [sub-command [sub-command-args]]
10

DESCRIPTION

12       module  is a user interface to the Modules package. The Modules package
13       provides for the dynamic modification of  the  user's  environment  via
14       modulefiles.
15
16       Each  modulefile contains the information needed to configure the shell
17       for an application. Once the Modules package is initialized, the  envi‐
18       ronment  can be modified on a per-module basis using the module command
19       which interprets modulefiles. Typically modulefiles instruct the module
20       command  to alter or set shell environment variables such as PATH, MAN‐
21       PATH, etc. Modulefiles may be shared by many  users  on  a  system  and
22       users  may  have their own set to supplement or replace the shared mod‐
23       ulefiles.
24
25       The modulefiles are added to and removed from the  current  environment
26       by  the  user. The environment changes contained in a modulefile can be
27       summarized through the module command as  well.  If  no  arguments  are
28       given, a summary of the module usage and sub-commands are shown.
29
30       The  action for the module command to take is described by the sub-com‐
31       mand and its associated arguments.
32
33   Package Initialization
34       The Modules package and the  module  command  are  initialized  when  a
35       shell-specific  initialization  script  is  sourced into the shell. The
36       script executes the autoinit sub-command of the  modulecmd.tcl  program
37       located  in /usr/share/Modules/libexec for the corresponding shell. The
38       output of this execution is evaluated by shell which creates the module
39       command  as either an alias or function and creates Modules environment
40       variables.
41
42       During this initialization process, if the Modules environment is found
43       undefined  (when both MODULEPATH and LOADEDMODULES are found either un‐
44       set or empty), the modulespath and initrc configuration  files  located
45       in /etc/environment-modules are evaluated if present and following this
46       order. modulespath file contains the list of modulepaths to enable dur‐
47       ing initialization. In this file, the modulepaths are separated by new‐
48       line or colon characters. initrc is a modulefile  that  defines  during
49       initialization  the  modulepaths to enable, the modules to load and the
50       module configuration to apply.
51
52       During the initialization process, if the Modules environment is  found
53       defined  a  module  refresh  is automatically applied to restore in the
54       current environment all non-persistent components set  by  loaded  mod‐
55       ules.
56
57       The module alias or function executes the modulecmd.tcl program and has
58       the shell evaluate the command's output. The  first  argument  to  mod‐
59       ulecmd.tcl specifies the type of shell.
60
61       The  initialization scripts are kept in /usr/share/Modules/init/<shell>
62       where <shell> is the name of the sourcing shell. For example, a C Shell
63       user sources the /usr/share/Modules/init/csh script. The sh, csh, tcsh,
64       bash, ksh, zsh and fish shells are supported by modulecmd.tcl. In addi‐
65       tion, python, perl, ruby, tcl, cmake, r and lisp "shells" are supported
66       which writes the environment changes to stdout as python,  perl,  ruby,
67       tcl, lisp, r or cmake code.
68
69       Initialization  may  also be performed by directly calling the autoinit
70       sub-command of the modulecmd.tcl program.
71
72       A ml alias or function may also be defined at  initialization  time  if
73       enabled (see MODULES_ML section). ml is a handy frontend leveraging all
74       module command capabilities with less character typed.  See  ml(1)  for
75       detailed information.
76
77   Examples of initialization
78       C Shell initialization (and derivatives):
79
80          source /usr/share/Modules/init/csh
81          module load modulefile modulefile ...
82
83       Bourne Shell (sh) (and derivatives):
84
85          . /usr/share/Modules/init/sh
86          module load modulefile modulefile ...
87
88       Perl:
89
90          require "/usr/share/Modules/init/perl.pm";
91          &module('load', 'modulefile', 'modulefile', '...');
92
93       Python:
94
95          import os
96          exec(open('/usr/share/Modules/init/python.py').read())
97          module('load', 'modulefile', 'modulefile', '...')
98
99       Bourne Shell (sh) (and derivatives) with autoinit sub-command:
100
101          eval "`/usr/share/Modules/libexec/modulecmd.tcl sh autoinit`"
102
103   Modulecmd startup
104       Upon  invocation  modulecmd.tcl  sources  a site-specific configuration
105       script if it exists. The location for this script is  /etc/environment-
106       modules/siteconfig.tcl.  An  additional siteconfig script may be speci‐
107       fied with the MODULES_SITECONFIG environment variable,  if  allowed  by
108       modulecmd.tcl  configuration,  and  will  be  loaded if it exists after
109       /etc/environment-modules/siteconfig.tcl. Siteconfig  is  a  Tcl  script
110       that  enables  to supersede any global variable or procedure definition
111       of modulecmd.tcl.
112
113       Afterward, modulecmd.tcl sources rc files which  contain  global,  user
114       and  modulefile specific setups. These files are interpreted as module‐
115       files. See modulefile(4) for detailed information.
116
117       Upon invocation of modulecmd.tcl module run-command files  are  sourced
118       in the following order:
119
120       1. Global  RC  file as specified by MODULERCFILE variable or /etc/envi‐
121          ronment-modules/rc. If MODULERCFILE points to a directory, the  mod‐
122          ulerc file in this directory is used as global RC file.
123
124       2. User specific module RC file $HOME/.modulerc
125
126       3. All .modulerc and .version files found during modulefile seeking.
127
128       These  module  run-command  files must begins like modulefiles with the
129       magic cookie #%Module. A  version  number  may  be  placed  after  this
130       string.  The  version  number  reflects  the  minimum  version  of mod‐
131       ulecmd.tcl required to interpret the run-command  file.  If  a  version
132       number  doesn't  exist,  then modulecmd.tcl will assume the run-command
133       file is compatible. Files without the magic cookie or  with  a  version
134       number  greater  than  the current version of modulecmd.tcl will not be
135       interpreted and an error is reported. Such error  does  not  abort  the
136       whole  module evaluation. If the mcookie_version_check configuration is
137       disabled the version number set is not checked.
138
139   Command line switches
140       The module command accepts command line switches as its  first  parame‐
141       ter. These may be used to control output format of all information dis‐
142       played and the module behavior in case  of  locating  and  interpreting
143       modulefiles.
144
145       All  switches may be entered either in short or long notation. The fol‐
146       lowing switches are accepted:
147
148       --all, -a
149              Include hidden modules in search performed with avail,  aliases,
150              list, search or whatis sub-commands. Hard-hidden modules are not
151              affected by this option.
152
153       --auto On load, unload and switch sub-commands, enable automated module
154              handling mode. See also MODULES_AUTO_HANDLING section.
155
156       --color=<WHEN>
157              Colorize  the output. WHEN defaults to always or can be never or
158              auto. See also MODULES_COLOR section.
159
160       --contains, -C
161              On avail sub-command, return modules whose fully qualified  name
162              contains search query string.
163
164       --debug, -D, -DD
165              Debug  mode. Causes module to print debugging messages about its
166              progress. Multiple -D options increase the debug verbosity.  The
167              maximum is 2.
168
169       --default, -d
170              On  avail  sub-command, display only the default version of each
171              module name. Default version is the explicitly set default  ver‐
172              sion  or  also the implicit default version if the configuration
173              option implicit_default is  enabled  (see  Locating  Modulefiles
174              section in the modulefile(4) man page for further details on im‐
175              plicit default version).
176
177       --force, -f
178              On load, unload and switch sub-commands, by-pass any unsatisfied
179              modulefile  constraint  corresponding to the declared prereq and
180              conflict. Which means for instance that  a  modulefile  will  be
181              loaded  even if it comes in conflict with another loaded module‐
182              file or that a modulefile will be unloaded even  if  it  is  re‐
183              quired as a prereq by another modulefile.
184
185              On clear sub-command, skip the confirmation dialog and proceed.
186
187       --help, -h
188              Give some helpful usage information, and terminates the command.
189
190       --icase, -i
191              Match  module specification arguments in a case insensitive man‐
192              ner.
193
194       --indepth
195              On avail sub-command, include in  search  results  the  matching
196              modulefiles  and directories and recursively the modulefiles and
197              directories contained in these matching directories.
198
199       --json, -j
200              Display avail, list, savelist, whatis and search output in  JSON
201              format.
202
203       --latest, -L
204              On  avail  sub-command,  display  only  the  highest numerically
205              sorted version of each module  name  (see  Locating  Modulefiles
206              section in the modulefile(4) man page).
207
208       --long, -l
209              Display avail, list and savelist output in long format.
210
211       --no-auto
212              On  load, unload and switch sub-commands, disable automated mod‐
213              ule handling mode. See also MODULES_AUTO_HANDLING section.
214
215       --no-indepth
216              On avail sub-command, limit search results to the matching  mod‐
217              ulefiles  and  directories found at the depth level expressed by
218              the search query. Thus modulefiles contained in directories part
219              of the result are excluded.
220
221       --no-pager
222              Do not pipe message output into a pager.
223
224       --output=LIST, -o LIST
225              Define  the  content to report in addition to module names. This
226              option is supported by avail and list sub-commands on their reg‐
227              ular  or  terse output modes. Accepted values are a LIST of ele‐
228              ments to report separated by colon character (:). The  order  of
229              the elements in LIST does not matter.
230
231              Accepted elements in LIST for avail sub-command are: modulepath,
232              alias, dirwsym, sym, tag and key.
233
234              Accepted elements in LIST for list sub-command are: header, idx,
235              variant, sym, tag and key.
236
237              The  order of the elements in LIST does not matter. Module names
238              are the only content reported when  LIST  is  set  to  an  empty
239              value.
240
241              See also MODULES_AVAIL_OUTPUT and MODULES_LIST_OUTPUT.
242
243       --paginate
244              Pipe all message output into less (or if set, to the command re‐
245              ferred in MODULES_PAGER variable) if error output  stream  is  a
246              terminal. See also MODULES_PAGER section.
247
248       --silent, -s
249              Turn  off error, warning and informational messages. module com‐
250              mand output result is not affected by silent mode.
251
252       --starts-with, -S
253              On avail sub-command, return  modules  whose  name  starts  with
254              search query string.
255
256       --terse, -t
257              Display avail, list and savelist output in short format.
258
259       --trace, -T
260              Trace  mode. Report details on module searches, resolutions, se‐
261              lections and evaluations in addition to  printing  verbose  mes‐
262              sages.
263
264       --verbose, -v, -vv
265              Enable  verbose messages during module command execution. Multi‐
266              ple -v options increase the verbosity level. The maximum is 2.
267
268       --version, -V
269              Lists the current version of the  module  command.  The  command
270              then terminates without further processing.
271
272       --width=COLS, -w COLS
273              Set   the  width  of  the  output  to  COLS  columns.  See  also
274              MODULES_TERM_WIDTH section.
275
276   Module Sub-Commands
277       add [--auto|--no-auto] [-f] modulefile...
278              See load.
279
280       aliases [-a]
281              List all available symbolic version-names  and  aliases  in  the
282              current  MODULEPATH.   All directories in the MODULEPATH are re‐
283              cursively searched  in  the  same  manner  than  for  the  avail
284              sub-command.  Only  the symbolic version-names and aliases found
285              in the search are displayed.
286
287       append-path [-d C|--delim C|--delim=C] [--duplicates] variable value...
288              Append value to environment variable. The variable is  a  colon,
289              or  delimiter,  separated  list.  See append-path in the module‐
290              file(4) man page for further explanation.
291
292              When append-path is called as a module sub-command,  the  refer‐
293              ence  counter  variable, which denotes the number of times value
294              has been added to environment variable, is not updated unless if
295              the --duplicates option is set.
296
297       apropos [-a] [-j] string
298              See search.
299
300       avail  [-d|-L]  [-t|-l|-j]  [-a]  [-o LIST] [-S|-C] [--indepth|--no-in‐
301       depth] [path...]
302              List all available modulefiles in the  current  MODULEPATH.  All
303              directories in the MODULEPATH are recursively searched for files
304              containing the modulefile magic cookie. If an argument is given,
305              then  each  directory  in the MODULEPATH is searched for module‐
306              files whose pathname, symbolic version-name or alias  match  the
307              argument.  Argument  may  contain  wildcard characters. Multiple
308              versions of an application can be supported by creating a subdi‐
309              rectory for the application containing modulefiles for each ver‐
310              sion.
311
312              Symbolic version-names and aliases found in the search are  dis‐
313              played in the result of this sub-command. Symbolic version-names
314              are displayed next to the modulefile they are assigned to within
315              parenthesis.  Aliases are listed in the MODULEPATH section where
316              they have been defined. To distinguish aliases from  modulefiles
317              a  @  symbol  is  added  within  parenthesis next to their name.
318              Aliases defined through a global or user specific module RC file
319              are listed under the global/user modulerc section.
320
321              When  colored  output is enabled and a specific graphical rendi‐
322              tion is defined for module default version, the  default  symbol
323              is  omitted  and  instead the defined graphical rendition is ap‐
324              plied to the relative modulefile. When colored output is enabled
325              and  a specific graphical rendition is defined for module alias,
326              the @ symbol is omitted. The defined graphical rendition applies
327              to  the  module alias name. See MODULES_COLOR and MODULES_COLORS
328              sections for details on colored output.
329
330              Module tags applying to the available  modulefiles  returned  by
331              the  avail  sub-command  are reported along the module name they
332              are associated to (see Module tags section).
333
334              A Key section is added at the end of the output in case some el‐
335              ements are reported in parentheses or chevrons along module name
336              or if some graphical rendition is made over some  outputed  ele‐
337              ments.  This Key section gives hints on the meaning of such ele‐
338              ments.
339
340              The parameter path may also refer to a symbolic modulefile  name
341              or a modulefile alias. It may also leverage a specific syntax to
342              finely select module version (see Advanced module version speci‐
343              fiers section below).
344
345       clear [-f]
346              Force  the  Modules  package to believe that no modules are cur‐
347              rently loaded.  A  confirmation  is  requested  if  command-line
348              switch  -f (or --force) is not passed. Typed confirmation should
349              equal to yes or y in order to proceed.
350
351       config [--dump-state|name [value]|--reset name]
352              Gets or sets modulecmd.tcl options. Reports  the  currently  set
353              value  of  passed option name or all existing options if no name
354              passed. If a name and a value are provided, the value of  option
355              name  is  set to value. If command-line switch --reset is passed
356              in addition to a name,  overridden  value  for  option  name  is
357              cleared.
358
359              When  a  reported option value differs from default value a men‐
360              tion is added to indicate whether the overridden value is coming
361              from  a  command-line  switch  (cmd-line) or from an environment
362              variable (env-var). When a reported option value is  locked  and
363              cannot be altered a (locked) mention is added.
364
365              If  no  value  is  currently set for an option name, the mention
366              <undef> is reported.
367
368              When command-line switch --dump-state is  passed,  current  mod‐
369              ulecmd.tcl  state  and Modules-related environment variables are
370              reported in addition to currently set modulecmd.tcl options.
371
372              Existing option names are:
373
374              advanced_version_spec
375                     Advanced module version specification  to  finely  select
376                     modulefiles.       Defines      environment      variable
377                     MODULES_ADVANCED_VERSION_SPEC when set.
378
379              auto_handling
380                     Automated     module     handling      mode.      Defines
381                     MODULES_AUTO_HANDLING.
382
383              avail_indepth
384                     avail   sub-command   in   depth   search  mode.  Defines
385                     MODULES_AVAIL_INDEPTH.
386
387              avail_output
388                     Content to report in addition to module  names  on  avail
389                     sub-command      regular     output     mode.     Defines
390                     MODULES_AVAIL_OUTPUT.
391
392              avail_terse_output
393                     Content to report in addition to module  names  on  avail
394                     sub-command      terse      output      mode.     Defines
395                     MODULES_AVAIL_TERSE_OUTPUT.
396
397              collection_pin_version
398                     Register exact modulefile version in collection.  Defines
399                     MODULES_COLLECTION_PIN_VERSION.
400
401              collection_target
402                     Collection  target which is valid for current system. De‐
403                     fines MODULES_COLLECTION_TARGET.
404
405              color  Colored output mode. Defines MODULES_COLOR.
406
407              colors Chosen  colors  to  highlight   output   items.   Defines
408                     MODULES_COLORS.
409
410              contact
411                     Modulefile contact address. Defines MODULECONTACT.
412
413              extended_default
414                     Allow   partial  module  version  specification.  Defines
415                     MODULES_EXTENDED_DEFAULT.
416
417              editor Text editor command to open modulefile with through  edit
418                     sub-command. Defines MODULES_EDITOR.
419
420              extra_siteconfig
421                     Additional  site-specific  configuration script location.
422                     Defines MODULES_SITECONFIG.
423
424              home   Location  of  Modules  package  main  directory.  Defines
425                     MODULESHOME.
426
427              icase  Enable case insensitive match. Defines MODULES_ICASE.
428
429              ignored_dirs
430                     Directories ignored when looking for modulefiles.
431
432                     The value of this option cannot be altered.
433
434              implicit_default
435                     Set  an  implicit  default  version  for modules. Defines
436                     MODULES_IMPLICIT_DEFAULT.
437
438              implicit_requirement
439                     Implicitly define a requirement onto modules specified on
440                     module      commands      in      modulefile.     Defines
441                     MODULES_IMPLICIT_REQUIREMENT.
442
443              list_output
444                     Content to report in addition to  module  names  on  list
445                     sub-command      regular     output     mode.     Defines
446                     MODULES_LIST_OUTPUT.
447
448              list_terse_output
449                     Content to report in addition to  module  names  on  list
450                     sub-command      terse      output      mode.     Defines
451                     MODULES_LIST_TERSE_OUTPUT.
452
453              locked_configs
454                     Configuration options that cannot be superseded. All  op‐
455                     tions  referred  in locked_configs value are locked, thus
456                     their value cannot be altered.
457
458                     The value of this option cannot be altered.
459
460              mcookie_version_check
461                     Defines if the version set in the  Modules  magic  cookie
462                     used  in modulefile should be checked against the version
463                     of modulecmd.tcl to determine if the modulefile could  be
464                     evaluated or not. Defines MODULES_MCOOKIE_VERSION_CHECK.
465
466              ml     Define   ml   command  at  initialization  time.  Defines
467                     MODULES_ML.
468
469              nearly_forbidden_days
470                     Set the number of days  a  module  should  be  considered
471                     nearly  forbidden prior reaching its expiry date. Defines
472                     MODULES_NEARLY_FORBIDDEN_DAYS.
473
474              pager  Text  viewer  to   paginate   message   output.   Defines
475                     MODULES_PAGER.
476
477              quarantine_support
478                     Defines  if  code for quarantine mechanism support should
479                     be generated in module shell function definition. Defines
480                     MODULES_QUARANTINE_SUPPORT.
481
482              rcfile Global run-command file location. Defines MODULERCFILE.
483
484              run_quarantine
485                     Environment   variables   to   indirectly  pass  to  mod‐
486                     ulecmd.tcl. Defines MODULES_RUN_QUARANTINE.
487
488              silent_shell_debug
489                     Disablement of shell debugging property  for  the  module
490                     command.  Also defines if code to silence shell debugging
491                     property should be generated  in  module  shell  function
492                     definition. Defines MODULES_SILENT_SHELL_DEBUG.
493
494              search_match
495                     Module search match style. Defines MODULES_SEARCH_MATCH.
496
497              set_shell_startup
498                     Ensure module command definition by setting shell startup
499                     file. Defines MODULES_SET_SHELL_STARTUP.
500
501              shells_with_ksh_fpath
502                     Ensure module command  is  defined  in  ksh  when  it  is
503                     started  as  a  sub-shell from the listed shells. Defines
504                     MODULES_SHELLS_WITH_KSH_FPATH.
505
506              siteconfig
507                     Primary site-specific configuration script location.
508
509                     The value of this option cannot be altered.
510
511              tag_abbrev
512                     Abbreviations to  use  to  report  module  tags.  Defines
513                     MODULES_TAG_ABBREV.
514
515              tag_color_name
516                     Tags whose name should be colored instead of module name.
517                     Defines MODULES_TAG_COLOR_NAME.
518
519              tcl_ext_lib
520                     Modules Tcl extension library location.
521
522                     The value of this option cannot be altered.
523
524              term_background
525                     Terminal     background     color      kind.      Defines
526                     MODULES_TERM_BACKGROUND.
527
528              term_width
529                     Set the width of the output. Defines MODULES_TERM_WIDTH.
530
531              unload_match_order
532                     Unload  firstly  loaded  or lastly loaded module matching
533                     request. Defines MODULES_UNLOAD_MATCH_ORDER.
534
535              variant_shortcut
536                     Shortcut characters that could be used to specify or  re‐
537                     port module variants.  Defines MODULES_VARIANT_SHORTCUT.
538
539              verbosity
540                     Module      command      verbosity     level.     Defines
541                     MODULES_VERBOSITY.
542
543              wa_277 Workaround    for    Tcsh    history    issue.    Defines
544                     MODULES_WA_277.
545
546       display modulefile...
547              Display  information  about one or more modulefiles. The display
548              sub-command will list the full path of the  modulefile  and  the
549              environment  changes  the modulefile will make if loaded. (Note:
550              It will not display any environment changes found within  condi‐
551              tional statements.)
552
553              The  parameter modulefile may also be a symbolic modulefile name
554              or a modulefile alias. It may also leverage a specific syntax to
555              finely select module version (see Advanced module version speci‐
556              fiers section below).
557
558       edit modulefile
559              Open modulefile for edition with text editor command  designated
560              by the editor configuration option.
561
562              The  parameter modulefile may also be a symbolic modulefile name
563              or a modulefile alias. It may also leverage a specific syntax to
564              finely select module version (see Advanced module version speci‐
565              fiers section below).
566
567       help [modulefile...]
568              Print the usage of each sub-command. If an  argument  is  given,
569              print the Module-specific help information for the modulefile.
570
571              The  parameter modulefile may also be a symbolic modulefile name
572              or a modulefile alias. It may also leverage a specific syntax to
573              finely select module version (see Advanced module version speci‐
574              fiers section below).
575
576       info-loaded modulefile
577              Returns the names of currently loaded  modules  matching  passed
578              modulefile.   Returns  an empty string if passed modulefile does
579              not match any loaded modules. See module-info loaded in the mod‐
580              ulefile(4) man page for further explanation.
581
582       initadd modulefile...
583              Add  modulefile to the shell's initialization file in the user's
584              home directory. The startup files checked (in order) are:
585
586              C Shell
587                 .modules, .cshrc, .csh_variables and .login
588
589              TENEX C Shell
590                 .modules, .tcshrc, .cshrc, .csh_variables and .login
591
592              Bourne and Korn Shells
593                 .modules, .profile
594
595              GNU Bourne Again Shell
596                 .modules, .bash_profile, .bash_login, .profile and .bashrc
597
598              Z Shell
599                 .modules, .zshrc, .zshenv and .zlogin
600
601              Friendly Interactive Shell
602                 .modules, .config/fish/config.fish
603
604              If a module load line is found in any of these files,  the  mod‐
605              ulefiles  are  appended to any existing list of modulefiles. The
606              module load line must be located in at least one  of  the  files
607              listed  above for any of the init sub-commands to work properly.
608              If the module load line is found in multiple  shell  initializa‐
609              tion files, all of the lines are changed.
610
611       initclear
612              Clear  all  of  the  modulefiles from the shell's initialization
613              files.
614
615       initlist
616              List all of the modulefiles loaded from the shell's  initializa‐
617              tion file.
618
619       initprepend modulefile...
620              Does  the  same as initadd but prepends the given modules to the
621              beginning of the list.
622
623       initrm modulefile...
624              Remove modulefile from the shell's initialization files.
625
626       initswitch modulefile1 modulefile2
627              Switch modulefile1 with modulefile2 in the  shell's  initializa‐
628              tion files.
629
630       is-avail modulefile...
631              Returns  a true value if any of the listed modulefiles exists in
632              enabled  MODULEPATH.  Returns  a  false  value  otherwise.   See
633              is-avail in the modulefile(4) man page for further explanation.
634
635              The  parameter modulefile may also be a symbolic modulefile name
636              or a modulefile alias. It may also leverage a specific syntax to
637              finely select module version (see Advanced module version speci‐
638              fiers section below).
639
640       is-loaded [modulefile...]
641              Returns a true value if any of the listed modulefiles  has  been
642              loaded  or  if  any  modulefile is loaded in case no argument is
643              provided. Returns a false value otherwise. See is-loaded in  the
644              modulefile(4) man page for further explanation.
645
646              The  parameter modulefile may also be a symbolic modulefile name
647              or a modulefile alias. It may also leverage a specific syntax to
648              finely select module version (see Advanced module version speci‐
649              fiers section below).
650
651       is-saved [collection...]
652              Returns a true value if any of the listed collections exists  or
653              if  any  collection  exists in case no argument is provided. Re‐
654              turns a false value otherwise. See is-saved in the modulefile(4)
655              man page for further explanation.
656
657       is-used [directory...]
658              Returns  a  true value if any of the listed directories has been
659              enabled in MODULEPATH or if any directory is enabled in case  no
660              argument  is  provided.  Returns  a  false  value otherwise. See
661              is-used in the modulefile(4) man page for further explanation.
662
663       keyword [-a] [-j] string
664              See search.
665
666       list [-a] [-o LIST] [-t|-l|-j]
667              List loaded modules.
668
669              Module tags applying to the loaded modules  are  reported  along
670              the  module  name  they  are associated to (see Module tags sec‐
671              tion).
672
673              Module variants selected on  the  loaded  modules  are  reported
674              along  the  module name they belong to (see Module variants sec‐
675              tion).
676
677              A Key section is added at the end of the output in case some el‐
678              ements are reported in parentheses or chevrons along module name
679              or if some graphical rendition is made over some  outputed  ele‐
680              ments.  This Key section gives hints on the meaning of such ele‐
681              ments.
682
683       load [--auto|--no-auto] [-f] modulefile...
684              Load modulefile into the shell environment.
685
686              Once loaded, the loaded module tag is associated to  the  loaded
687              module.  If module has been automatically loaded by another mod‐
688              ule, the auto-loaded tag is associated instead (see Module  tags
689              section).
690
691              The  parameter modulefile may also be a symbolic modulefile name
692              or a modulefile alias. It may also leverage a specific syntax to
693              finely select module version (see Advanced module version speci‐
694              fiers section below).
695
696       path modulefile
697              Print path to modulefile.
698
699              The parameter modulefile may also be a symbolic modulefile  name
700              or a modulefile alias. It may also leverage a specific syntax to
701              finely select module version (see Advanced module version speci‐
702              fiers section below).
703
704       paths modulefile
705              Print path of available modulefiles matching argument.
706
707              The  parameter modulefile may also be a symbolic modulefile name
708              or a modulefile alias. It may also leverage a specific syntax to
709              finely select module version (see Advanced module version speci‐
710              fiers section below).
711
712       prepend-path  [-d  C|--delim   C|--delim=C]   [--duplicates]   variable
713       value...
714              Prepend  value to environment variable. The variable is a colon,
715              or delimiter, separated list. See prepend-path  in  the  module‐
716              file(4) man page for further explanation.
717
718              When  prepend-path is called as a module sub-command, the refer‐
719              ence counter variable, which denotes the number of  times  value
720              has been added to environment variable, is not updated unless if
721              the --duplicates option is set.
722
723       purge [-f]
724              Unload all loaded modulefiles.
725
726              When the --force option is set, also unload modulefiles that are
727              depended by unloadable modules.
728
729       refresh
730              Force  a  refresh  of all non-persistent components of currently
731              loaded modules.  This should be used  on  derived  shells  where
732              shell  aliases  or  shell functions need to be reinitialized but
733              the environment variables have already been set by the currently
734              loaded modules.
735
736              Loaded  modules  are  evaluated  in refresh mode following their
737              load order.  In this evaluation  mode  only  the  set-alias  and
738              set-function   modulefile   commands  will  produce  environment
739              changes. Other  modulefile  commands  that  produce  environment
740              changes  (like  setenv  or append-path) are ignored during a re‐
741              fresh evaluation as their changes should already be applied.
742
743       reload Unload then load all loaded modulefiles.
744
745              No unload then load is performed and an error is returned if the
746              loaded  modulefiles have unsatisfied constraint corresponding to
747              the prereq and conflict they declare.
748
749       remove-path [-d C|--delim C|--delim=C] [--index] variable value...
750              Remove value from the colon, or delimiter, separated list in en‐
751              vironment  variable.  See  remove-path  in the modulefile(4) man
752              page for further explanation.
753
754              When remove-path is called as a module sub-command,  the  refer‐
755              ence  counter  variable, which denotes the number of times value
756              has been added to environment variable, is ignored and value  is
757              removed whatever the reference counter value set.
758
759       restore [collection]
760              Restore  the environment state as defined in collection. If col‐
761              lection name is not specified, then it is assumed to be the  de‐
762              fault collection. If collection is a fully qualified path, it is
763              restored from this location rather than from a  file  under  the
764              user's  collection  directory.  If  MODULES_COLLECTION_TARGET is
765              set, a suffix equivalent to the value of this  variable  is  ap‐
766              pended to the collection file name to restore.
767
768              When restoring a collection, the currently set MODULEPATH direc‐
769              tory list and the currently loaded modulefiles  are  unused  and
770              unloaded  then  used  and loaded to exactly match the MODULEPATH
771              and loaded modulefiles lists saved in this collection file.  The
772              order  of  the  paths  and modulefiles set in collection is pre‐
773              served when restoring. It means that  currently  loaded  modules
774              are  unloaded to get the same LOADEDMODULES root than collection
775              and currently used module paths  are  unused  to  get  the  same
776              MODULEPATH  root. Then missing module paths are used and missing
777              modulefiles are loaded.
778
779              If a module, without a default version  explicitly  defined,  is
780              recorded  in  a collection by its bare name: loading this module
781              when restoring the collection will fail if the configuration op‐
782              tion implicit_default is disabled.
783
784       rm [--auto|--no-auto] [-f] modulefile...
785              See unload.
786
787       save [collection]
788              Record  the currently set MODULEPATH directory list and the cur‐
789              rently loaded modulefiles in a collection file under the  user's
790              collection  directory  $HOME/.module.  If collection name is not
791              specified, then it is assumed to be the default  collection.  If
792              collection  is a fully qualified path, it is saved at this loca‐
793              tion rather than under the user's collection directory.
794
795              If MODULES_COLLECTION_TARGET is set, a suffix equivalent to  the
796              value  of  this variable will be appended to the collection file
797              name.
798
799              By default, if a loaded modulefile corresponds to the explicitly
800              defined   default  module  version,  the  bare  module  name  is
801              recorded. If the configuration option  implicit_default  is  en‐
802              abled,  the  bare  module name is also recorded for the implicit
803              default module version. If MODULES_COLLECTION_PIN_VERSION is set
804              to  1,  module  version is always recorded even if it is the de‐
805              fault version.
806
807              No collection is recorded and an error is returned if the loaded
808              modulefiles  have  unsatisfied  constraint  corresponding to the
809              prereq and conflict they declare.
810
811       savelist [-t|-l|-j]
812              List collections that are currently saved under the user's  col‐
813              lection  directory.  If  MODULES_COLLECTION_TARGET  is set, only
814              collections matching the target suffix will be displayed.
815
816       saverm [collection]
817              Delete the collection file under the  user's  collection  direc‐
818              tory. If collection name is not specified, then it is assumed to
819              be the default collection. If MODULES_COLLECTION_TARGET is  set,
820              a  suffix  equivalent  to the value of this variable will be ap‐
821              pended to the collection file name.
822
823       saveshow [collection]
824              Display the content of collection. If  collection  name  is  not
825              specified,  then  it is assumed to be the default collection. If
826              collection is a fully qualified path, this location is displayed
827              rather than a collection file under the user's collection direc‐
828              tory. If MODULES_COLLECTION_TARGET is set, a  suffix  equivalent
829              to the value of this variable will be appended to the collection
830              file name.
831
832       search [-a] [-j] string
833              Seeks through the module-whatis information of  all  modulefiles
834              for the specified string. All module-whatis information matching
835              the string in a  case  insensitive  manner  will  be  displayed.
836              string may contain wildcard characters.
837
838       sh-to-mod shell script [arg...]
839              Evaluate with shell the designated script with defined arguments
840              to find out the environment changes it does.  Environment  prior
841              and  after  script  evaluation  are  compared to determine these
842              changes. They are translated into modulefile commands to  output
843              the  modulefile  content  equivalent  to the evaluation of shell
844              script.
845
846              Changes on environment variables, shell aliases, shell functions
847              and current working directory are tracked.
848
849              Shell  could be specified as a command name or a fully qualified
850              pathname.  The following shells are supported:  sh,  dash,  csh,
851              tcsh, bash, ksh, ksh93, zsh and fish.
852
853       show modulefile...
854              See display.
855
856       source scriptfile...
857              Execute  scriptfile  into the shell environment. scriptfile must
858              be written with modulefile syntax and  specified  with  a  fully
859              qualified path. Once executed scriptfile is not marked loaded in
860              shell environment which differ from load sub-command.
861
862       swap [--auto|--no-auto] [-f] [modulefile1] modulefile2
863              See switch.
864
865       switch [--auto|--no-auto] [-f] [modulefile1] modulefile2
866              Switch loaded modulefile1 with modulefile2.  If  modulefile1  is
867              not  specified,  then  it  is assumed to be the currently loaded
868              module with the same root name as modulefile2.
869
870              The parameter modulefile may also be a symbolic modulefile  name
871              or a modulefile alias. It may also leverage a specific syntax to
872              finely select module version (see Advanced module version speci‐
873              fiers section below).
874
875       try-add [--auto|--no-auto] [-f] modulefile...
876              See try-load.
877
878       test modulefile...
879              Execute and display results of the Module-specific tests for the
880              modulefile.
881
882              The parameter modulefile may also be a symbolic modulefile  name
883              or a modulefile alias. It may also leverage a specific syntax to
884              finely select module version (see Advanced module version speci‐
885              fiers section below).
886
887       try-load [--auto|--no-auto] [-f] modulefile...
888              Like  load  sub-command, load modulefile into the shell environ‐
889              ment, but do not complain if modulefile cannot be found. If mod‐
890              ulefile  is  found  but its evaluation fails, error is still re‐
891              ported.
892
893              Once loaded, the loaded module tag is associated to  the  loaded
894              module.  If module has been automatically loaded by another mod‐
895              ule, the auto-loaded tag is associated instead (see Module  tags
896              section).
897
898              The  parameter modulefile may also be a symbolic modulefile name
899              or a modulefile alias. It may also leverage a specific syntax to
900              finely select module version (see Advanced module version speci‐
901              fiers section below).
902
903       unload [--auto|--no-auto] [-f] modulefile...
904              Remove modulefile from the shell environment.
905
906              The parameter modulefile may also be a symbolic modulefile  name
907              or a modulefile alias. It may also leverage a specific syntax to
908              finely select module version (see Advanced module version speci‐
909              fiers section below).
910
911       unuse directory...
912              Remove  one  or more directories from the MODULEPATH environment
913              variable.
914
915              If module unuse is called during a  modulefile  evaluation,  the
916              reference          counter          environment         variable
917              __MODULES_SHARE_MODULEPATH, which denotes the  number  of  times
918              directory  has been enabled, is checked and directory is removed
919              only if its relative counter is equal to 1 or not defined.  Oth‐
920              erwise  directory  is kept and reference counter is decreased by
921              1.  When module unuse is called from the command-line or  within
922              an  initialization  modulefile script directory is removed what‐
923              ever the reference counter value set.
924
925              If directory corresponds to the concatenation of multiple  paths
926              separated by colon character, each path is treated separately.
927                 Changed  in  version  5.0:  directory is removed whatever its
928                 reference counter value if module unuse is  called  from  the
929                 command-line or within an initialization modulefile script
930
931
932                 Changed  in version 5.0: Accept several modulepaths passed as
933                 a single string
934
935
936       use [-a|--append] directory...
937              Prepend one or more directories to  the  MODULEPATH  environment
938              variable.   The  --append  flag  will  append  the  directory to
939              MODULEPATH.
940
941              When directory is already defined in MODULEPATH, it is not added
942              again or moved at the end or at the beginning of the environment
943              variable.
944
945              If module use is called during a modulefile evaluation, the ref‐
946              erence  counter  environment variable __MODULES_SHARE_MODULEPATH
947              is also set to increase the number of times directory  has  been
948              added  to  MODULEPATH.  Reference  counter  is  not updated when
949              module use is called from the command-line or within an initial‐
950              ization modulefile script.
951
952              A directory that does not exist yet can be specified as argument
953              and then be added to MODULEPATH.
954
955       whatis [-a] [-j] [modulefile...]
956              Display the information set up by the module-whatis commands in‐
957              side  the specified modulefiles. These specified modulefiles may
958              be expressed using wildcard  characters.  If  no  modulefile  is
959              specified, all module-whatis lines will be shown.
960
961              The  parameter modulefile may also be a symbolic modulefile name
962              or a modulefile alias. It may also leverage a specific syntax to
963              finely select module version (see Advanced module version speci‐
964              fiers section below).
965
966   Modulefiles
967       modulefiles are written in the Tool Command Language (Tcl) and are  in‐
968       terpreted by modulecmd.tcl. modulefiles can use conditional statements.
969       Thus the effect a modulefile will have on the  environment  may  change
970       depending upon the current state of the environment.
971
972       Environment  variables  are unset when unloading a modulefile. Thus, it
973       is possible to load a modulefile and then unload it without having  the
974       environment variables return to their prior state.
975
976   Advanced module version specifiers
977       When  the  advanced module version specifiers mechanism is enabled (see
978       MODULES_ADVANCED_VERSION_SPEC), the specification of modulefile  passed
979       on  Modules  sub-commands changes. After the module name a version con‐
980       straint and variants may be added.
981
982   Version specifiers
983       After the module name a version constraint prefixed by the @  character
984       may be added. It could be directly appended to the module name or sepa‐
985       rated from it with a space character.
986
987       Constraints can be expressed to refine the selection of module  version
988       to:
989
990       • a  single  version  with  the @version syntax, for instance foo@1.2.3
991         syntax will select module foo/1.2.3
992
993       • a list of versions with the @version1,version2,...  syntax,  for  in‐
994         stance foo@1.2.3,1.10 will match modules foo/1.2.3 and foo/1.10
995
996       • a  range  of  versions  with  the  @version1:,  @:version2  and @ver‐
997         sion1:version2 syntaxes, for instance foo@1.2: will select  all  ver‐
998         sions  of  module foo greater than or equal to 1.2, foo@:1.3 will se‐
999         lect all versions less than or equal to 1.3 and  foo@1.2:1.3  matches
1000         all versions between 1.2 and 1.3 including 1.2 and 1.3 versions
1001
1002       Advanced  specification of single version or list of versions may bene‐
1003       fit  from  the  activation  of  the  extended  default  mechanism  (see
1004       MODULES_EXTENDED_DEFAULT) to use an abbreviated notation like @1 to re‐
1005       fer to more precise version numbers like 1.2.3. Range  of  versions  on
1006       its side natively handles abbreviated versions.
1007
1008       In  order to be specified in a range of versions or compared to a range
1009       of versions, the version major element should corresponds to a  number.
1010       For  instance 10a, 1.2.3, 1.foo are versions valid for range comparison
1011       whereas default or foo.2 versions are invalid for range comparison.
1012
1013       Range of versions can  be  specified  in  version  list,  for  instance
1014       foo@:1.2,1.4:1.6,1.8:.  Such  specification  helps  to exclude specific
1015       versions, like versions 1.3 and 1.7 in previous example.
1016
1017       If   the   implicit   default   mechanism   is   also   enabled    (see
1018       MODULES_IMPLICIT_DEFAULT),  a  default and latest symbolic versions are
1019       automatically defined for each module  name  (also  at  each  directory
1020       level  for  deep  modulefiles). These automatic version symbols are de‐
1021       fined unless a symbolic version, alias, or regular module  version  al‐
1022       ready  exists  for  these  default  or  latest version names. Using the
1023       mod@latest (or mod/latest) syntax  ensures  highest  available  version
1024       will be selected.
1025
1026       The symbolic version loaded may be used over loaded module name to des‐
1027       ignate the loaded version of the module with associated selected  vari‐
1028       ants.  This version symbol should be specified using the @ prefix nota‐
1029       tion (e.g., foo@loaded). An error is returned if no version  of  desig‐
1030       nated module is currently loaded.
1031
1032   Variants
1033       After  the  module name, variants can be specified. Module variants are
1034       alternative evaluation of the same modulefile. A variant  is  specified
1035       by  associating  a value to its name. This specification is then trans‐
1036       mitted to the evaluating modulefile which instantiates the  variant  in
1037       the  ModuleVariant  array variable when reaching the variant modulefile
1038       command declaring this variant.
1039
1040       Variant can be specified with the name=value syntax where name  is  the
1041       declared  variant name and value, the value this variant is set to when
1042       evaluating the modulefile.
1043
1044       Boolean variants can be specified with the +name  syntax  to  set  this
1045       variant  on  and  with  the -name or ~name syntaxes to set this variant
1046       off. The -name syntax is not supported on ml(1) command  as  the  minus
1047       sign  already  means  to  unload designated module. The ~name and +name
1048       syntaxes could also be defined appended to another  specification  word
1049       (e.g.,  the  module  name,  version  or another variant specification),
1050       whereas -name syntax must be the start of a new specification word.
1051
1052       Boolean variants may also be  specified  with  the  name=value  syntax.
1053       value  should  be set to 1, true, t, yes, y or on to enable the variant
1054       or it should be set to 0, false, f, no, n or off to disable  the  vari‐
1055       ant.
1056
1057       Shortcuts   may  be  used  to  abbreviate  variant  specification.  The
1058       variant_shortcut configuration option associates shortcut character  to
1059       variant  name. With a shortcut defined, variant could be specified with
1060       the <shortcut>value syntax. For instance if character %  is  set  as  a
1061       shortcut  for  variant  foo,  the  %value  syntax  is equivalent to the
1062       foo=value syntax.
1063
1064       Specific characters used in variant specification syntax cannot be used
1065       as  part of the name of a module. These specific characters are +, ~, =
1066       and all characters set as variant shortcut. Exception  is  made  for  +
1067       character  which  could  be set one or several consecutive times at the
1068       end of module name (e.g., name+ or name++).
1069
1070   Module tags
1071       Module tags are piece of information that can be associated to individ‐
1072       ual modulefiles. Tags could be purely informational or may lead to spe‐
1073       cific behaviors.
1074
1075       Module tags may be inherited from the module state set by a  modulefile
1076       command or consequence of a module action. The inherited tags are:
1077
1078auto-loaded: module has been automatically loaded by another module
1079
1080forbidden:  module has been set forbidden through the use of the mod‐
1081         ule-forbid command and thus this module cannot be loaded.
1082
1083hidden: module has been set hidden through the use of the module-hide
1084         command and thus it is not reported by default among the result of an
1085         avail sub-command.
1086
1087hidden-loaded: module has been set hidden once loaded through the use
1088         of the module-hide --hidden-loaded command thus it is not reported bu
1089         default among the result of a list sub-command.
1090
1091loaded: module is currently loaded
1092
1093nearly-forbidden: module will soon be forbidden, which has  been  set
1094         through  the  use of the module-forbid command. Thus this module will
1095         soon not be able to load anymore.
1096
1097       Tags may also be associated to modules by using the module-tag  module‐
1098       file  command.  Among tags that could be set this way, some have a spe‐
1099       cial meaning:
1100
1101sticky: module once  loaded  cannot  be  unloaded  unless  forced  or
1102         reloaded (see Sticky modules section)
1103
1104super-sticky:  module once loaded cannot be unloaded unless reloaded,
1105         module cannot be unloaded even if forced (see Sticky modules section)
1106
1107       Module tags are reported along the module they  are  associated  to  on
1108       avail and list sub-command results. Tags could be reported either:
1109
1110       • along  the  module name, all tags set within angle brackets, each tag
1111         separated from the others  with  a  colon  character  (e.g.,  foo/1.2
1112         <tag1:tag2>).
1113
1114       • graphically  rendered over the module name for each tag associated to
1115         a Select Graphic Rendition (SGR)  code  in  the  color  palette  (see
1116         MODULES_COLORS)
1117
1118       When   an   abbreviated  string  is  associated  to  a  tag  name  (see
1119       MODULES_TAG_ABBREV), this abbreviation is used to report tag along  the
1120       module  name or the tag is graphically rendered over the module name if
1121       a SGR code is associated with tag abbreviation in  the  color  palette.
1122       With  an abbreviation set, the SGR code associated to the tag full name
1123       is ignored thus an SGR code should be associated to the abbreviation to
1124       get  a  graphical rendering of tag. If the abbreviation associated to a
1125       tag corresponds to the empty string, tag is not reported.
1126
1127       Graphical rendering is made over the tag name or  abbreviation  instead
1128       of  over  the  module name for each tag name or abbreviation set in the
1129       MODULES_TAG_COLOR_NAME environment variable.
1130
1131       When several tags have to be rendered graphically over the same  module
1132       name,  each tag is rendered over a sub-part of the module name. In case
1133       more tags need to be rendered than the total number  of  characters  in
1134       the  module  name, the remaining tags are graphically rendered over the
1135       tag name instead of over the module name.
1136
1137       When the JSON output mode is enabled (with --json), tags  are  reported
1138       by their name under the tags attribute. Tag abbreviation and color ren‐
1139       dering do not apply on JSON output.
1140
1141       Module tags cannot be used in search query to designate a modulefile.
1142
1143   Sticky modules
1144       Modules are said sticky when they cannot be unloaded (they stick to the
1145       loaded environment). Two kind of stickyness can be distinguished:
1146
1147sticky  module:  cannot be unloaded unless if the unload is forced or
1148         if the module is reloaded after being unloaded
1149
1150super-sticky module: cannot be  unloaded  unless  if  the  module  is
1151         reloaded  after  being  unloaded;  super-sticky modules cannot be un‐
1152         loaded even if the unload is forced.
1153
1154       Modules are designated sticky by associating them the sticky or the su‐
1155       per-sticky module tag with the module-tag modulefile command.
1156
1157       When stickyness is defined over the generic module name (and not over a
1158       specific module version, a version list or a version range), sticky  or
1159       super-sticky  module  can  be swapped by another version of module. For
1160       instance if the sticky tag is defined over foo  module,  loaded  module
1161       foo/1.2 can be swapped by foo/2.0. Such stickyness definition means one
1162       version of module should stay loaded whatever version it is.
1163
1164   Module variants
1165       Module variants are alternative evaluation of the  same  modulefile.  A
1166       variant  is specified by associating a value to its name when designat‐
1167       ing module.  Variant specification relies on the Advanced  module  ver‐
1168       sion specifiers mechanism.
1169
1170       Once  specified,  variant's value is transmitted to the evaluating mod‐
1171       ulefile which instantiates the variant in the ModuleVariant array vari‐
1172       able  when reaching the variant modulefile command declaring this vari‐
1173       ant.  For instance the module load foo/1.2 bar=value1 command leads  to
1174       the evaluation of foo/1.2 modulefile with bar=value1 variant specifica‐
1175       tion.  When reaching the variant bar value1 value2  value3  command  in
1176       modulefile  during its evaluation, the ModuleVariant(bar) array element
1177       is set to the value1 string.
1178
1179       Once variants are instantiated, modulefile's code could check the vari‐
1180       ant  values  to  adapt the evaluation and define for instance different
1181       module requirements or produce different environment variable setup.
1182
1183       Variants are interpreted in contexts where modulefiles  are  evaluated.
1184       Thus  the  variants  specified on module designation are ignored by the
1185       avail, whatis, is-avail, path or paths sub-commands.
1186
1187       When modulefile is evaluated a value should be specified for each vari‐
1188       ant this modulefile declares. When reaching the variant modulefile com‐
1189       mand declaring a variant, an error is raised if no value  is  specified
1190       for this variant and if no default value is declared. Specified variant
1191       value should match a value from the declared accepted value list other‐
1192       wise  an  error  is  raised. Additionally if a variant is specified but
1193       does not correspond to a variant declared in modulefile,  an  error  is
1194       raised.
1195
1196       Module variants are reported along the module they are associated to on
1197       list sub-command results. Variants are  reported  within  curly  braces
1198       next  to module name, each variant definition separated from the others
1199       with a colon character (e.g., foo/1.2{variant1=value:+variant2}). Bool‐
1200       ean  variants  are  reported  with  the +name or -name syntaxes. When a
1201       shortcut    character    is    defined    for    a     variant     (see
1202       MODULES_VARIANT_SHORTCUT)  it is reported with the <shortcut>value syn‐
1203       tax. For instance if % character is defined as a shortcut for variant1:
1204       foo/1.2{%value:+variant2}.
1205
1206       When  the  JSON  output mode is enabled (with --json), variants are re‐
1207       ported under the variants JSON object as name/value  pairs.  Values  of
1208       Boolean  variant  are set as JSON Boolean. Other values are set as JSON
1209       strings.  Variant shortcut and color rendering do  not  apply  on  JSON
1210       output.
1211
1212   Collections
1213       Collections describe a sequence of module use then module load commands
1214       that are interpreted by modulecmd.tcl to set the  user  environment  as
1215       described  by  this  sequence. When a collection is activated, with the
1216       restore sub-command, module paths and loaded modules are unused or  un‐
1217       loaded  if they are not part or if they are not ordered the same way as
1218       in the collection.
1219
1220       Collections are generated by the save sub-command that dumps  the  cur‐
1221       rent  user  environment  state in terms of module paths and loaded mod‐
1222       ules. By default collections are saved under the  $HOME/.module  direc‐
1223       tory.
1224
1225       Collections  may  be  valid for a given target if they are suffixed. In
1226       this case these collections can only be restored if their suffix corre‐
1227       spond to the current value of the MODULES_COLLECTION_TARGET environment
1228       variable (see the dedicated section of this topic below).
1229

EXIT STATUS

1231       The module command exits with 0 if its execution succeed.  Otherwise  1
1232       is returned.
1233

ENVIRONMENT

1235       __MODULES_AUTOINIT_INPROGRESS
1236              If set to 1, the autoinit sub-command process is skipped.
1237
1238              This  environment  variable is set to 1 by the autoinit sub-com‐
1239              mand after checking it is not set. It ensures no nested initial‐
1240              ization  of  Modules  occur. At the end of the processing of the
1241              autoinit sub-command, __MODULES_AUTOINIT_INPROGRESS is unset.
1242
1243       __MODULES_LMALTNAME
1244              A colon separated list of the alternative names set through mod‐
1245              ule-version  and  module-alias  statements  corresponding to all
1246              loaded modulefiles. Each element in this list starts by the name
1247              of  the  loaded modulefile followed by all alternative names re‐
1248              solving to it. The loaded modulefile and its  alternative  names
1249              are separated by the ampersand character.
1250
1251              Each  alternative name stored in __MODULES_LMALTNAME is prefixed
1252              by the al| string if it corresponds to a module  alias  or  pre‐
1253              fixed  by  the as| string if it corresponds to an automatic ver‐
1254              sion symbol. These prefixes help to  distinguish  the  different
1255              kind of alternative name.
1256
1257              This  environment variable is intended for module command inter‐
1258              nal use to get  knowledge  of  the  alternative  names  matching
1259              loaded  modulefiles in order to keep environment consistent when
1260              conflicts or pre-requirements are  set  over  these  alternative
1261              designations.  It  also  helps to find a match after modulefiles
1262              being loaded when unload, is-loaded or info-loaded  actions  are
1263              run over these names.
1264
1265              Starting  version  4.7  of  Modules, __MODULES_LMALTNAME is also
1266              used on list sub-command to report the symbolic versions associ‐
1267              ated with the loaded modules.
1268
1269       __MODULES_LMCONFLICT
1270              A colon separated list of the conflict statements defined by all
1271              loaded modulefiles. Each element in this list starts by the name
1272              of  the loaded modulefile declaring the conflict followed by the
1273              name of all modulefiles  it  declares  a  conflict  with.  These
1274              loaded  modulefiles  and  conflicting modulefile names are sepa‐
1275              rated by the ampersand character.
1276
1277              This environment variable is intended for module command  inter‐
1278              nal use to get knowledge of the conflicts declared by the loaded
1279              modulefiles in order to keep environment consistent when a  con‐
1280              flicting module is asked for load afterward.
1281
1282       __MODULES_LMPREREQ
1283              A  colon  separated list of the prereq statements defined by all
1284              loaded modulefiles. Each element in this list starts by the name
1285              of  the loaded modulefile declaring the pre-requirement followed
1286              by the name of all modulefiles it declares a prereq with.  These
1287              loaded  modulefiles  and pre-required modulefile names are sepa‐
1288              rated by the ampersand character. When  a  prereq  statement  is
1289              composed  of  multiple  modulefiles,  these modulefile names are
1290              separated by the pipe character.
1291
1292              This environment variable is intended for module command  inter‐
1293              nal  use to get knowledge of the pre-requirement declared by the
1294              loaded modulefiles in order to keep environment consistent  when
1295              a pre-required module is asked for unload afterward.
1296
1297       __MODULES_LMSOURCESH
1298              A  colon  separated  list of the source-sh statements defined by
1299              all loaded modulefiles. Each element in this list starts by  the
1300              name  of the loaded modulefile declaring the environment changes
1301              made by the evaluation of source-sh scripts. This name  is  fol‐
1302              lowed  by each source-sh statement call and corresponding result
1303              achieved in modulefile. The  loaded  modulefile  name  and  each
1304              source-sh  statement  description are separated by the ampersand
1305              character. The source-sh statement call and each resulting  mod‐
1306              ulefile  command  (corresponding to the environment changes done
1307              by sourced script) are separated by the pipe character.
1308
1309              This environment variable is intended for module command  inter‐
1310              nal  use to get knowledge of the modulefile commands applied for
1311              each source-sh command when loading the modulefile. In order  to
1312              reverse these modulefile commands when modulefile is unloaded to
1313              undo the environment changes.
1314
1315       __MODULES_LMTAG
1316              A colon separated list of the tags corresponding to  all  loaded
1317              modulefiles  that have been set through module-tag statements or
1318              from other modulefile statements like  module-forbid  (that  may
1319              apply  the  nearly-forbidden  tag  in  specific  situation) (see
1320              Module tags section).  Each element in this list starts  by  the
1321              name  of  the loaded modulefile followed by all tags applying to
1322              it. The loaded modulefile and its tags are separated by the  am‐
1323              persand character.
1324
1325              This  environment variable is intended for module command inter‐
1326              nal use to get knowledge of the tags applying to loaded  module‐
1327              files  in  order to report these tags on list sub-command output
1328              or to apply specific behavior when unloading modulefile.
1329
1330       __MODULES_LMVARIANT
1331              A colon separated list of the variant instantiated through vari‐
1332              ant  statements  by  all loaded modulefiles (see Module variants
1333              section).  Each element in this list starts by the name  of  the
1334              loaded  modulefile  followed  by all the variant definitions set
1335              during the load of this module.  The loaded modulefile and  each
1336              of its variant definition are separated by the ampersand charac‐
1337              ter. Each variant definition starts with the variant name,  fol‐
1338              lowed  by  the variant value set, then a flag to know if variant
1339              is of the Boolean type and last element in this definition is  a
1340              flag  to  know  if  the chosen value is the default one for this
1341              variant and if it has been automatically set or not. These  four
1342              elements  composing  the variant definition are separated by the
1343              pipe character.
1344
1345              This environment variable is intended for module command  inter‐
1346              nal  use  to  get  knowledge of the variant value defined by the
1347              loaded modulefiles in order to keep environment consistent  when
1348              requirements  are  set  over a specific variant value or just to
1349              report these variant values when listing loaded modules.
1350
1351       __MODULES_QUAR_<VAR>
1352              Value of environment variable <VAR> passed to  modulecmd.tcl  in
1353              order to restore <VAR> to this value once started.
1354
1355       __MODULES_QUARANTINE_SET
1356              If  set  to  1, restore the environment variables set on hold by
1357              the quarantine mechanism  when  starting  modulecmd.tcl  script.
1358              This variable is automatically defined by Modules shell initial‐
1359              ization scripts or module shell function  when  they  apply  the
1360              quarantine mechanism.  (see MODULES_QUARANTINE_SUPPORT).
1361
1362       __MODULES_SHARE_<VAR>
1363              Reference counter variable for path-like variable <VAR>. A colon
1364              separated list containing pairs of elements. A pair is formed by
1365              a  path  element followed its usage counter which represents the
1366              number of times this path has been enabled in variable <VAR>.  A
1367              colon separates the two parts of the pair.
1368
1369              An  element  of  a  path-like variable is added to the reference
1370              counter variable as soon as it is added more than one time. When
1371              an element of a path-like variable is not found in the reference
1372              counter variable, it means this element has only be  added  once
1373              to the path-like variable.
1374
1375              When  an  empty  string  is added as an element in the path-like
1376              variable, it is added to the reference counter variable even  if
1377              added  only once to distinguish between an empty path-like vari‐
1378              able and a path-like variable containing an empty string as sin‐
1379              gle element.
1380
1381       _LMFILES_
1382              A  colon separated list of the full pathname for all loaded mod‐
1383              ulefiles.
1384
1385       LOADEDMODULES
1386              A colon separated list of all loaded modulefiles.
1387
1388       MODULECONTACT
1389              Email address to contact in case any issue occurs during the in‐
1390              terpretation of modulefiles.
1391
1392       MODULEPATH
1393              The  path that the module command searches when looking for mod‐
1394              ulefiles. Typically, it is set to the  main  modulefiles  direc‐
1395              tory,   /usr/share/Modules/modulefiles,  by  the  initialization
1396              script. MODULEPATH can be set using module use or by the  module
1397              initialization script to search group or personal modulefile di‐
1398              rectories before or after the main modulefile directory.
1399
1400              Path elements registered in the MODULEPATH environment  variable
1401              may  contain  reference  to environment variables which are con‐
1402              verted to their corresponding value by module command each  time
1403              it looks at the MODULEPATH value. If an environment variable re‐
1404              ferred in a path element is not defined, its reference  is  con‐
1405              verted to an empty string.
1406
1407       MODULERCFILE
1408              The  location of a global run-command file containing modulefile
1409              specific setup. See Modulecmd startup section for  detailed  in‐
1410              formation.
1411
1412       MODULES_ADVANCED_VERSION_SPEC
1413              If  set  to  1,  enable  advanced module version specifiers (see
1414              Advanced module version specifiers section). If set to  0,  dis‐
1415              able advanced module version specifiers.
1416
1417              Advanced  module version specifiers enablement is defined in the
1418              following order of preference: MODULES_ADVANCED_VERSION_SPEC en‐
1419              vironment  variable then the default set in modulecmd.tcl script
1420              configuration.  Which means MODULES_ADVANCED_VERSION_SPEC  over‐
1421              rides default configuration.
1422
1423       MODULES_AUTO_HANDLING
1424              If  set to 1, enable automated module handling mode. If set to 0
1425              disable automated module handling mode.  Other  values  are  ig‐
1426              nored.
1427
1428              Automated  module  handling  mode consists in additional actions
1429              triggered when loading or unloading a modulefile to satisfy  the
1430              constraints  it  declares.  When loading a modulefile, following
1431              actions are triggered:
1432
1433              • Requirement Load: load of the modulefiles declared as a prereq
1434                of the loading modulefile.
1435
1436              • Dependent Reload: reload of the modulefiles declaring a prereq
1437                onto loaded modulefile or declaring a prereq onto a modulefile
1438                part of this reloading batch.
1439
1440              When unloading a modulefile, following actions are triggered:
1441
1442              • Dependent  Unload:  unload  of  the  modulefiles  declaring  a
1443                non-optional prereq onto unloaded modulefile  or  declaring  a
1444                non-optional  prereq  onto a modulefile part of this unloading
1445                batch. A prereq modulefile is considered optional if the  pre‐
1446                req  definition  order  is made of multiple modulefiles and at
1447                least one alternative modulefile is loaded.
1448
1449              • Useless Requirement Unload: unload of the  prereq  modulefiles
1450                that  have  been  automatically loaded for either the unloaded
1451                modulefile, an unloaded dependent modulefile or  a  modulefile
1452                part  of this useless requirement unloading batch. Modulefiles
1453                are added to this unloading batch only if  they  are  not  re‐
1454                quired by any other loaded modulefiles.
1455
1456              • Dependent  Reload:  reload of the modulefiles declaring a con‐
1457                flict or an optional prereq onto either the  unloaded  module‐
1458                file, an unloaded dependent or an unloaded useless requirement
1459                or declaring a prereq onto a modulefile part of this reloading
1460                batch.
1461
1462              In case a loaded modulefile has some of its declared constraints
1463              unsatisfied (pre-required modulefile not loaded  or  conflicting
1464              modulefile  loaded  for instance), this loaded modulefile is ex‐
1465              cluded from the automatic reload actions described above.
1466
1467              For the specific case of the switch sub-command, where a module‐
1468              file is unloaded to then load another modulefile. Dependent mod‐
1469              ulefiles to Unload are merged into the Dependent modulefiles  to
1470              Reload  that are reloaded after the load of the switched-to mod‐
1471              ulefile.
1472
1473              Automated module handling mode enablement is defined in the fol‐
1474              lowing   order  of  preference:  --auto/--no-auto  command  line
1475              switches, then MODULES_AUTO_HANDLING environment variable,  then
1476              the  default  set  in  modulecmd.tcl script configuration. Which
1477              means MODULES_AUTO_HANDLING overrides default configuration  and
1478              --auto/--no-auto command line switches override every other ways
1479              to enable or disable this mode.
1480
1481       MODULES_AVAIL_INDEPTH
1482              If set to 1, enable in depth search results for  avail  sub-com‐
1483              mand. If set to 0 disable avail sub-command in depth mode. Other
1484              values are ignored.
1485
1486              When in depth mode is enabled, modulefiles and directories  con‐
1487              tained in directories matching search query are also included in
1488              search results. When disabled these modulefiles and  directories
1489              contained in matching directories are excluded.
1490
1491              avail  sub-command  in  depth  mode enablement is defined in the
1492              following order of  preference:  --indepth/--no-indepth  command
1493              line  switches, then MODULES_AVAIL_INDEPTH environment variable,
1494              then the default  set  in  modulecmd.tcl  script  configuration.
1495              Which  means  MODULES_AVAIL_INDEPTH overrides default configura‐
1496              tion and --indepth/--no-indepth command line  switches  override
1497              every other ways to enable or disable this mode.
1498
1499       MODULES_AVAIL_OUTPUT
1500              A  colon separated list of the elements to report in addition to
1501              module names on avail sub-command regular output mode.
1502
1503              Accepted elements that can be set in value list are:
1504
1505alias: module aliases.
1506
1507dirwsym: directories associated with symbolic versions.
1508
1509key: legend appended at the end of the output to explain it.
1510
1511modulepath: modulepath names set as header prior the  list  of
1512                available modules found in them.
1513
1514sym: symbolic versions associated with available modules.
1515
1516tag: tags associated with available modules.
1517
1518              The  order  of  the elements in the list does not matter. Module
1519              names are the only content reported when LIST is set to an empty
1520              value.
1521
1522              In  case  the modulepath element is missing from value list, the
1523              available modules from  global/user  rc  and  all  enabled  mod‐
1524              ulepaths are reported as a single list.
1525
1526              avail  sub-command regular output content is defined in the fol‐
1527              lowing order of preference: --output/-o command  line  switches,
1528              then MODULES_AVAIL_OUTPUT environment variable, then the default
1529              set  in  modulecmd.tcl   script   configuration.   Which   means
1530              MODULES_AVAIL_OUTPUT   overrides   default   configuration   and
1531              --output/-o command line switches override every other  ways  to
1532              configure regular output content.
1533
1534       MODULES_AVAIL_TERSE_OUTPUT
1535              A  colon separated list of the elements to report in addition to
1536              module names on avail sub-command terse output mode.
1537
1538              See MODULES_AVAIL_OUTPUT to get the accepted elements  that  can
1539              be set in value list.
1540
1541              The  order  of  the elements in the list does not matter. Module
1542              names are the only content reported when LIST is set to an empty
1543              value.
1544
1545              avail sub-command terse output content is defined in the follow‐
1546              ing order of preference: --output/-o command line switches, then
1547              MODULES_AVAIL_TERSE_OUTPUT  environment  variable,  then the de‐
1548              fault set in modulecmd.tcl  script  configuration.  Which  means
1549              MODULES_AVAIL_TERSE_OUTPUT  overrides  default configuration and
1550              --output/-o command line switches override every other  ways  to
1551              configure terse output content.
1552
1553       MODULES_CMD
1554              The location of the active module command script.
1555
1556       MODULES_COLLECTION_PIN_VERSION
1557              If  set  to 1, register exact version number of modulefiles when
1558              saving a collection.  Otherwise  modulefile  version  number  is
1559              omitted  if it corresponds to the explicitly set default version
1560              and also to the implicit default when the  configuration  option
1561              implicit_default is enabled.
1562
1563       MODULES_COLLECTION_TARGET
1564              The collection target that determines what collections are valid
1565              thus reachable on the current system.
1566
1567              Collection directory may sometimes be  shared  on  multiple  ma‐
1568              chines  which may use different modules setup. For instance mod‐
1569              ules users may access with the same HOME directory multiple sys‐
1570              tems  using different OS versions.  When it happens a collection
1571              made on machine 1 may be erroneous on machine 2.
1572
1573              When a target is set, only the collections made for that  target
1574              are  available  to  the  restore,  savelist, saveshow and saverm
1575              sub-commands. Saving a collection registers the target footprint
1576              by  suffixing  the  collection  filename  with .$MODULES_COLLEC‐
1577              TION_TARGET. The collection target is not involved when  collec‐
1578              tion is specified as file path on the saveshow, restore and save
1579              sub-commands.
1580
1581              For example, the MODULES_COLLECTION_TARGET variable may  be  set
1582              with  results  from  commands like lsb_release, hostname, dnsdo‐
1583              mainname, etc.
1584
1585       MODULES_COLOR
1586              Defines if output should be colored or not. Accepted values  are
1587              never, auto and always.
1588
1589              When  color  mode  is set to auto, output is colored only if the
1590              standard error output channel is attached to a terminal.
1591
1592              Colored output enablement is defined in the following  order  of
1593              preference:  --color command line switch, then MODULES_COLOR en‐
1594              vironment variable, then NO_COLOR, CLICOLOR  and  CLICOLOR_FORCE
1595              environment  variables,  then  the  default set in modulecmd.tcl
1596              script configuration. Which means  MODULES_COLOR  overrides  de‐
1597              fault configuration and the NO_COLOR and CLICOLOR/CLICOLOR_FORCE
1598              variables.  --color command line switch  overrides  every  other
1599              ways to enable or disable this mode.
1600
1601              NO_COLOR,  CLICOLOR and CLICOLOR_FORCE environment variables are
1602              also honored to define color mode. The  never  mode  is  set  if
1603              NO_COLOR  is  defined  (regardless  of its value) or if CLICOLOR
1604              equals to 0. If CLICOLOR is set to another value, it corresponds
1605              to  the  auto  mode. The always mode is set if CLICOLOR_FORCE is
1606              set to a value different than  0.   NO_COLOR  variable  prevails
1607              over  CLICOLOR  and  CLICOLOR_FORCE.  Color  mode set with these
1608              three variables is superseded by mode set with MODULES_COLOR en‐
1609              vironment variable.
1610
1611       MODULES_COLORS
1612              Specifies the colors and other attributes used to highlight var‐
1613              ious parts of the output. Its value is a colon-separated list of
1614              output  items  associated  to  a  Select Graphic Rendition (SGR)
1615              code. It follows the same syntax than LS_COLORS.
1616
1617              Output items are designated by keys. Items able to be  colorized
1618              are: highlighted element (hi), debug information (db), trace in‐
1619              formation (tr), tag separator (se); Error  (er),  warning  (wa),
1620              module  error  (me)  and  info (in) message prefixes; Modulepath
1621              (mp), directory (di), module alias (al),  module  variant  (va),
1622              module  symbolic  version  (sy), module default version (de) and
1623              modulefile command (cm).
1624
1625              Module tags can also be colorized. The key to set in  the  color
1626              palette to get a graphical rendering of a tag is the tag name or
1627              the tag abbreviation if one is defined for tag. The SGR code ap‐
1628              plied  to  a  tag  name is ignored if an abbreviation is set for
1629              this tag thus the SGR code should be defined for this  abbrevia‐
1630              tion to get a graphical rendering. Each basic tag has by default
1631              a key set in the color palette, based on its abbreviated string:
1632              auto-loaded  (aL),  forbidden (F), hidden and hidden-loaded (H),
1633              loaded (L), nearly-forbidden (nF), sticky (S)  and  super-sticky
1634              (sS).
1635
1636              See the Select Graphic Rendition (SGR) section in the documenta‐
1637              tion of the text terminal that is used for permitted values  and
1638              their  meaning  as  character attributes. These substring values
1639              are integers in decimal representation and can  be  concatenated
1640              with  semicolons.  Modules  takes  care of assembling the result
1641              into a complete SGR sequence (\33[...m). Common values  to  con‐
1642              catenate include 1 for bold, 4 for underline, 30 to 37 for fore‐
1643              ground colors and 90 to 97 for 16-color mode foreground  colors.
1644              See                                                         also
1645              https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
1646              for a complete SGR code reference.
1647
1648              No  graphical  rendition  will be applied to an output item that
1649              could normally be colored but which is not defined in the  color
1650              set.  Thus if MODULES_COLORS is defined empty, no output will be
1651              colored at all.
1652
1653              The color set is defined for Modules in the following  order  of
1654              preference:  MODULES_COLORS  environment  variable, then the de‐
1655              fault set in modulecmd.tcl  script  configuration.  Which  means
1656              MODULES_COLORS overrides default configuration.
1657
1658       MODULES_EDITOR
1659              Text  editor  command  name  or  path for use to open modulefile
1660              through the edit sub-command.
1661
1662              Editor command is defined for Modules in the following order  of
1663              preference:  MODULES_EDITOR,  or  VISUAL  or  EDITOR environment
1664              variables, then the default set in modulecmd.tcl script configu‐
1665              ration.  Which  means  MODULES_EDITOR overrides VISUAL or EDITOR
1666              environment variables and default configuration.
1667
1668       MODULES_EXTENDED_DEFAULT
1669              If set to 1, a  specified  module  version  is  matched  against
1670              starting portion of existing module versions, where portion is a
1671              substring separated from the rest of the version string by  a  .
1672              character.  For example specified modules mod/1 and mod/1.2 will
1673              match existing  modulefile mod/1.2.3.
1674
1675              In case multiple modulefiles match the specified module  version
1676              and  a  single module has to be selected, the explicitly set de‐
1677              fault version is returned if it is part of matching modulefiles.
1678              Otherwise the implicit default among matching modulefiles is re‐
1679              turned if defined (see MODULES_IMPLICIT_DEFAULT section)
1680
1681              This environment variable supersedes the value of the configura‐
1682              tion option extended_default set in modulecmd.tcl script.
1683
1684       MODULES_ICASE
1685              When  module  specification  are  passed  as  argument to module
1686              sub-commands or modulefile Tcl commands, defines the case sensi‐
1687              tiveness  to  apply  to match them. When MODULES_ICASE is set to
1688              never, a case sensitive match is applied in any cases. When  set
1689              to  search,  a  case  insensitive match is applied to the avail,
1690              whatis and paths sub-commands. When set to always, a case insen‐
1691              sitive  match  is  also applied to the other module sub-commands
1692              and modulefile Tcl commands for the  module  specification  they
1693              receive as argument.
1694
1695              Case sensitiveness behavior is defined in the following order of
1696              preference: --icase command line switch,  which  corresponds  to
1697              the  always  mode, then MODULES_ICASE environment variable, then
1698              the default set in  modulecmd.tcl  script  configuration.  Which
1699              means  MODULES_ICASE overrides default configuration and --icase
1700              command line switch overrides every other ways to set case  sen‐
1701              sitiveness behavior.
1702
1703       MODULES_IMPLICIT_DEFAULT
1704              Defines  (if  set to 1) or not (if set to 0) an implicit default
1705              version for modules without a default version explicitly defined
1706              (see  Locating  Modulefiles  section  in  the  modulefile(4) man
1707              page).
1708
1709              Without either an explicit or implicit default version defined a
1710              module  must  be fully qualified (version should be specified in
1711              addition to its name) to get:
1712
1713              • targeted by module load, switch, display, help, test and  path
1714                sub-commands.
1715
1716              • restored  from  a collection, unless already loaded in collec‐
1717                tion-specified order.
1718
1719              • automatically loaded by automated module  handling  mechanisms
1720                (see  MODULES_AUTO_HANDLING  section)  when declared as module
1721                requirement, with prereq or module load modulefile commands.
1722
1723              An error is returned in the above situations if  either  no  ex‐
1724              plicit or implicit default version is defined.
1725
1726              This environment variable supersedes the value of the configura‐
1727              tion option implicit_default set in modulecmd.tcl  script.  This
1728              environment variable is ignored if implicit_default has been de‐
1729              clared locked in locked_configs configuration option.
1730
1731       MODULES_IMPLICIT_REQUIREMENT
1732              Defines (if set to 1) or not (if set to 0) an implicit prereq or
1733              conflict requirement onto modules specified respectively on mod‐
1734              ule load or module unload commands in modulefile.  When  enabled
1735              an  implicit conflict requirement onto switched-off module and a
1736              prereq requirement onto switched-on module are also defined  for
1737              module switch commands used in modulefile.
1738
1739              This environment variable supersedes the value of the configura‐
1740              tion option implicit_requirement set  in  modulecmd.tcl  script.
1741              MODULES_IMPLICIT_REQUIREMENT   is  in  turn  superseded  by  the
1742              --not-req option that applies to a module command in  a  module‐
1743              file.
1744
1745       MODULES_LIST_OUTPUT
1746              A  colon separated list of the elements to report in addition to
1747              module names on list sub-command regular output mode.
1748
1749              Accepted elements that can be set in value list are:
1750
1751header: sentence to introduce the list of loaded modules or to
1752                state that no modules are loaded currently.
1753
1754idx: index position of each loaded module.
1755
1756key: legend appended at the end of the output to explain it.
1757
1758variant: variant values selected for loaded modules.
1759
1760sym: symbolic versions associated with loaded modules.
1761
1762tag: tags associated with loaded modules.
1763
1764              The  order  of  the elements in the list does not matter. Module
1765              names are the only content reported when LIST is set to an empty
1766              value.
1767
1768              list  sub-command  regular output content is defined in the fol‐
1769              lowing order of preference: --output/-o command  line  switches,
1770              then  MODULES_LIST_OUTPUT environment variable, then the default
1771              set  in  modulecmd.tcl   script   configuration.   Which   means
1772              MODULES_LIST_OUTPUT    overrides   default   configuration   and
1773              --output/-o command line switches override every other  ways  to
1774              configure regular output content.
1775
1776       MODULES_LIST_TERSE_OUTPUT
1777              A  colon separated list of the elements to report in addition to
1778              module names on list sub-command terse output mode.
1779
1780              See MODULES_LIST_OUTPUT to get the accepted elements that can be
1781              set in value list.
1782
1783              The  order  of  the elements in the list does not matter. Module
1784              names are the only content reported when LIST is set to an empty
1785              value.
1786
1787              list  sub-command  regular output content is defined in the fol‐
1788              lowing order of preference: --output/-o command  line  switches,
1789              then  MODULES_LIST_TERSE_OUTPUT  environment  variable, then the
1790              default set in modulecmd.tcl script configuration.  Which  means
1791              MODULES_LIST_TERSE_OUTPUT  overrides  default  configuration and
1792              --output/-o command line switches override every other  ways  to
1793              configure regular output content.
1794
1795       MODULES_MCOOKIE_VERSION_CHECK
1796              If set to 1, the version set in the Modules magic cookie in mod‐
1797              ulefile is checked against the current version of  modulecmd.tcl
1798              to determine if the modulefile can be evaluated.
1799
1800       MODULES_ML
1801              If  set  to  1, define ml command when initializing Modules (see
1802              Package Initialization section). If set to 0, ml command is  not
1803              defined.
1804
1805              ml command enablement is defined in the following order of pref‐
1806              erence: MODULES_ML environment variable then the default set  in
1807              modulecmd.tcl script configuration. Which means MODULES_ML over‐
1808              rides default configuration.
1809
1810       MODULES_NEARLY_FORBIDDEN_DAYS
1811              Number of days a module is  considered  nearly  forbidden  prior
1812              reaching  its  expiry  date set by module-forbid modulefile com‐
1813              mand. When a nearly forbidden module is evaluated a warning mes‐
1814              sage  is  issued to inform module will soon be forbidden. If set
1815              to 0, modules will never be  considered  nearly  forbidden.  Ac‐
1816              cepted values are integers comprised between 0 and 365.
1817
1818              This  configuration is defined in the following order of prefer‐
1819              ence: MODULES_NEARLY_FORBIDDEN_DAYS  environment  variable  then
1820              the  default  set  in  modulecmd.tcl script configuration. Which
1821              means MODULES_NEARLY_FORBIDDEN_DAYS overrides default configura‐
1822              tion.
1823
1824       MODULES_PAGER
1825              Text  viewer  for use to paginate message output if error output
1826              stream is attached to a terminal. The value of this variable  is
1827              composed  of a pager command name or path eventually followed by
1828              command-line options.
1829
1830              Paging command and options are defined for Modules in  the  fol‐
1831              lowing  order of preference: MODULES_PAGER environment variable,
1832              then the default  set  in  modulecmd.tcl  script  configuration.
1833              Which means MODULES_PAGER overrides default configuration.
1834
1835              If  MODULES_PAGER  variable  is set to an empty string or to the
1836              value cat, pager will not be launched.
1837
1838       MODULES_QUARANTINE_SUPPORT
1839              If set to 1, produces the shell code  for  quarantine  mechanism
1840              when  the  autoinit sub-command generates the module shell func‐
1841              tion.
1842
1843              The generated shell code  for  quarantine  mechanism  indirectly
1844              passes      the      environment     variable     defined     in
1845              MODULES_RUN_QUARANTINE to the modulecmd.tcl  script  to  protect
1846              its  run-time  environment from side-effect coming from the cur‐
1847              rent definition of these variables.
1848
1849              To enable quarantine support, MODULES_QUARANTINE_SUPPORT  should
1850              be    set   to   1   prior   Modules   initialization   or   the
1851              quarantine_support configuration should be set to 1 in the  ini‐
1852              trc configuration file.
1853
1854              Generated    code    for    quarantine    mechanism   sets   the
1855              __MODULES_QUARANTINE_SET environment variable when  calling  the
1856              modulecmd.tcl script to make it restore the environment variable
1857              put in quarantine.
1858
1859              Quarantine mechanism support is defined for Modules in the  fol‐
1860              lowing  order of preference: MODULES_QUARANTINE_SUPPORT environ‐
1861              ment variable, then the default set in modulecmd.tcl script con‐
1862              figuration. Which means MODULES_QUARANTINE_SUPPORT overrides de‐
1863              fault configuration.
1864
1865       MODULES_RUN_QUARANTINE
1866              A space separated list of environment variable names that should
1867              be  passed  indirectly  to modulecmd.tcl to protect its run-time
1868              environment from side-effect coming from their  current  defini‐
1869              tion.
1870
1871              If  the  quarantine  mechanism has been included in module shell
1872              function (see MODULES_QUARANTINE_SUPPORT), each  variable  found
1873              in  MODULES_RUN_QUARANTINE will have its value emptied or set to
1874              the value of  the  corresponding  MODULES_RUNENV_<VAR>  variable
1875              when defining modulecmd.tcl run-time environment.
1876
1877              Original values of these environment variables set in quarantine
1878              are passed to modulecmd.tcl via __MODULES_QUAR_<VAR> variables.
1879
1880       MODULES_RUNENV_<VAR>
1881              Value to set to environment  variable  <VAR>  for  modulecmd.tcl
1882              run-time     execution     if     <VAR>     is    referred    in
1883              MODULES_RUN_QUARANTINE.
1884
1885       MODULES_SEARCH_MATCH
1886              When searching for modules with avail sub-command,  defines  the
1887              way  query  string  should match against available module names.
1888              With starts_with value, returned modules are  those  whose  name
1889              begins by search query string. When set to contains, any modules
1890              whose fully qualified name contains search query string are  re‐
1891              turned.
1892
1893              Module  search  match style is defined in the following order of
1894              preference: --starts-with and --contains command line  switches,
1895              then MODULES_SEARCH_MATCH environment variable, then the default
1896              set  in  modulecmd.tcl   script   configuration.   Which   means
1897              MODULES_SEARCH_MATCH   overrides   default   configuration   and
1898              --starts-with/--contains command line  switches  override  every
1899              other ways to set search match style.
1900
1901       MODULES_SET_SHELL_STARTUP
1902              If  set  to 1, defines when module command initializes the shell
1903              startup file to ensure that the module command is still  defined
1904              in sub-shells. Setting shell startup file means defining the ENV
1905              and BASH_ENV environment variable to the  Modules  bourne  shell
1906              initialization  script.  If  set to 0, shell startup file is not
1907              defined.
1908
1909       MODULES_SHELLS_WITH_KSH_FPATH
1910              A list of shell on which the FPATH environment  variable  should
1911              be  defined at initialization time to point to the ksh-functions
1912              directory where the ksh initialization script for module command
1913              is  located.   It  enables  for  the listed shells to get module
1914              function defined when starting ksh as sub-shell from there.
1915
1916              Accepted values are a list of shell among sh,  bash,  csh,  tcsh
1917              and fish separated by colon character (:).
1918
1919       MODULES_SILENT_SHELL_DEBUG
1920              If  set  to  1, disable any xtrace or verbose debugging property
1921              set on current shell session for the duration of either the mod‐
1922              ule  command or the module shell initialization script. Only ap‐
1923              plies to Bourne Shell (sh) and its derivatives.
1924
1925              To generate the code to silence shell debugging property in  the
1926              module  shell function, MODULES_SILENT_SHELL_DEBUG should be set
1927              to 1 prior Modules initialization or the silent_shell_debug con‐
1928              figuration option should be set to 1 in the initrc configuration
1929              file.
1930
1931       MODULES_SITECONFIG
1932              Location of a site-specific configuration script to source  into
1933              modulecmd.tcl. See also Modulecmd startup section.
1934
1935              This  environment  variable  is  ignored if extra_siteconfig has
1936              been declared locked in locked_configs configuration option.
1937
1938       MODULES_TAG_ABBREV
1939              Specifies the abbreviation strings used to  report  module  tags
1940              (see  Module  tags section). Its value is a colon-separated list
1941              of module tag names associated to an abbreviation  string  (e.g.
1942              tagname=abbrev).
1943
1944              If a tag is associated to an empty string abbreviation, this tag
1945              will not be reported. In case the whole MODULES_TAG_ABBREV envi‐
1946              ronment  variable  is  set to an empty string, tags are reported
1947              but not abbreviated.
1948
1949              The tag abbreviation definition set in MODULES_TAG_ABBREV  envi‐
1950              ronment  variable  supersedes  the  default configuration set in
1951              modulecmd.tcl script.
1952
1953       MODULES_TAG_COLOR_NAME
1954              Specifies the tag names or abbreviations whose graphical render‐
1955              ing  should  be applied over themselves instead of being applied
1956              over the name of the module  they  are  attached  to.  Value  of
1957              MODULES_TAG_COLOR_NAME  is  a colon-separated list of module tag
1958              names or abbreviation strings (see Module tags section).
1959
1960              When a select graphic rendition is defined for a tag name  or  a
1961              tag  abbreviation string, it is applied over the module name as‐
1962              sociated with the tag and tag name or abbreviation is  not  dis‐
1963              played.  When listed in MODULES_TAG_COLOR_NAME environment vari‐
1964              able, a tag name or abbreviation is displayed and select graphic
1965              rendition is applied over it.
1966
1967              The  definition  set in MODULES_TAG_COLOR_NAME environment vari‐
1968              able supersedes the default configuration set  in  modulecmd.tcl
1969              script.
1970
1971       MODULES_TERM_BACKGROUND
1972              Inform  Modules of the terminal background color to determine if
1973              the color set for dark background or the  color  set  for  light
1974              background  should  be  used to color output in case no specific
1975              color set is defined with the MODULES_COLORS variable.  Accepted
1976              values are dark and light.
1977
1978       MODULES_TERM_WIDTH
1979              Specifies  the number of columns of the output. If set to 0, the
1980              output width will be the full terminal width, which is automati‐
1981              cally  detected by the module command. Accepted values are inte‐
1982              gers comprised between 0 and 1000.
1983
1984              This configuration is defined in the following order of  prefer‐
1985              ence:    --width    or    -w   command   line   switches,   then
1986              MODULES_TERM_WIDTH environment variable, then the default set in
1987              modulecmd.tcl      script     configuration.     Which     means
1988              MODULES_TERM_WIDTH overrides default configuration.  --width  or
1989              -w command line switches override every other configuration.
1990
1991       MODULES_UNLOAD_MATCH_ORDER
1992              When  a  module  unload request matches multiple loaded modules,
1993              unload firstly loaded module or lastly loaded  module.  Accepted
1994              values are returnfirst and returnlast.
1995
1996       MODULES_VARIANT_SHORTCUT
1997              Specifies  the shortcut characters that could be used to specify
1998              and report module variants (see Module  variants  section).  Its
1999              value is a colon-separated list of variant names associated to a
2000              shortcut character (e.g., variantname=shortcutchar).
2001
2002              A variant shortcut must be of  one  character  length  and  must
2003              avoid  characters  used  for  other  concerns or in module names
2004              (i.e., [-+~/@=a-zA-Z0-9]).
2005
2006              If a shortcut is associated to an empty  string  or  an  invalid
2007              character, this shortcut definition will be ignored.
2008
2009              The  variant shortcut definition set in MODULES_VARIANT_SHORTCUT
2010              environment variable supersedes the default configuration set in
2011              modulecmd.tcl script.
2012
2013       MODULES_VERBOSITY
2014              Defines  the  verbosity  level  of the module command. Available
2015              verbosity levels from the least to the most verbose are:
2016
2017silent: turn off error, warning and informational messages but
2018                does not affect module command output result.
2019
2020concise:  enable error and warning messages but disable infor‐
2021                mational messages.
2022
2023normal: turn on informational messages, like a report  of  the
2024                additional  module evaluations triggered by loading or unload‐
2025                ing modules, aborted evaluation issues or  a  report  of  each
2026                module   evaluation  occurring  during  a  restore  or  source
2027                sub-commands.
2028
2029verbose: add additional informational messages, like a system‐
2030                atic report of the loading or unloading module evaluations.
2031
2032verbose2:  report  loading  or unloading module evaluations of
2033                hidden-loaded modules, report if  loading  module  is  already
2034                loaded or if unloading module is not loaded.
2035
2036trace: provide details on module searches, resolutions, selec‐
2037                tions and evaluations.
2038
2039debug: print debugging messages about  module  command  execu‐
2040                tion.
2041
2042debug2:  report  modulecmd.tcl  procedure calls in addition to
2043                printing debug messages.
2044
2045              Module command verbosity is defined in the  following  order  of
2046              preference:  --silent,  --verbose,  --debug  and --trace command
2047              line switches, then MODULES_VERBOSITY environment variable, then
2048              the  default  set  in  modulecmd.tcl script configuration. Which
2049              means  MODULES_VERBOSITY  overrides  default  configuration  and
2050              --silent/--verbose/--debug/--trace  command  line switches over‐
2051              rides every other ways to set verbosity level.
2052
2053       MODULES_WA_277
2054              If set to 1 prior to  Modules  package  initialization,  enables
2055              workaround       for      Tcsh      history      issue      (see
2056              https://github.com/cea-hpc/modules/issues/277).    This    issue
2057              leads  to erroneous history entries under Tcsh shell. When work‐
2058              around is enabled, an alternative module alias is defined  which
2059              fixes the history mechanism issue. However the alternative defi‐
2060              nition of the module alias weakens shell evaluation of the  code
2061              produced  by modulefiles.  Characters with a special meaning for
2062              Tcsh shell (like { and }) may not be used anymore in shell alias
2063              definition otherwise the evaluation of the code produced by mod‐
2064              ulefiles will return a syntax error.
2065
2066       MODULESHOME
2067              The location of the main Modules package file directory contain‐
2068              ing  module  command initialization scripts, the executable pro‐
2069              gram modulecmd.tcl, and a directory containing a  collection  of
2070              main modulefiles.
2071

FILES

2073       /usr/share/Modules
2074          The MODULESHOME directory.
2075
2076       /etc/environment-modules/initrc
2077          The  configuration  file evaluated by modulecmd.tcl when it initial‐
2078          izes to enable the default modulepaths, load the default modules and
2079          set module command configuration.
2080
2081          initrc  is  a modulefile(4) so it is written as a Tcl script and de‐
2082          fines modulepaths to enable with module use, modules  to  load  with
2083          module  load  and  configuration to apply with module config. As any
2084          modulefile initrc must begin with the magic cookie #%Module.
2085
2086          initrc is optional. When this configuration file is  present  it  is
2087          evaluated  after the modulespath configuration file. See the Package
2088          Initialization section for details.
2089
2090       /etc/environment-modules/modulespath
2091          The configuration file evaluated by modulecmd.tcl when  it  initial‐
2092          izes  to enable the default modulepaths. This file contains the list
2093          of modulepaths separated by either newline or colon characters.
2094
2095          modulespath is optional. When this configuration file is present  it
2096          is  evaluated  before the initrc configuration file. See the Package
2097          Initialization section for details.
2098
2099       /etc/environment-modules/siteconfig.tcl
2100          The site-specific configuration script of  modulecmd.tcl.  An  addi‐
2101          tional   configuration   script   could   be   defined   using   the
2102          MODULES_SITECONFIG environment variable.
2103
2104       /etc/environment-modules/rc
2105          The system-wide modules rc file. The location of this  file  can  be
2106          changed  using  the  MODULERCFILE  environment variable as described
2107          above.
2108
2109       $HOME/.modulerc
2110          The user specific modules rc file.
2111
2112       $HOME/.module
2113          The user specific collection directory.
2114
2115       /usr/share/Modules/modulefiles
2116          The directory for system-wide modulefiles. The location of  the  di‐
2117          rectory  can be changed using the MODULEPATH environment variable as
2118          described above.
2119
2120       /usr/share/Modules/libexec/modulecmd.tcl
2121          The modulefile interpreter that gets executed upon  each  invocation
2122          of module.
2123
2124       /usr/share/Modules/init/<shell>
2125          The  Modules package initialization file sourced into the user's en‐
2126          vironment.
2127

SEE ALSO

2129       ml(1), modulefile(4)
2130
2132       1996-1999  John  L.  Furlani  &  Peter  W.  Osel,  1998-2017  R.K.Owen,
2133       2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2021 Xavier Delaruelle
2134
2135
2136
2137
21385.0.1                             2021-10-16                         MODULE(1)
Impressum