1MODULE(1) Modules MODULE(1)
2
3
4
6 module - command interface to the Modules package
7
9 module [switches] [sub-command [sub-command-args]]
10
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 creates the module command as either an alias or function and
37 creates Modules environment variables.
38
39 The module alias or function executes the modulecmd.tcl program located
40 in /usr/share/Modules/libexec and has the shell evaluate the command's
41 output. The first argument to modulecmd.tcl specifies the type of
42 shell.
43
44 The initialization scripts are kept in /usr/share/Modules/init/<shell>
45 where <shell> is the name of the sourcing shell. For example, a C Shell
46 user sources the /usr/share/Modules/init/csh script. The sh, csh, tcsh,
47 bash, ksh, zsh and fish shells are supported by modulecmd.tcl. In addi‐
48 tion, python, perl, ruby, tcl, cmake, r and lisp "shells" are supported
49 which writes the environment changes to stdout as python, perl, ruby,
50 tcl, lisp, r or cmake code.
51
52 Initialization may also be performed by calling the autoinit sub-com‐
53 mand of the modulecmd.tcl program. Evaluation into the shell of the
54 result of this command defines the module alias or function.
55
56 Examples of initialization
57 C Shell initialization (and derivatives):
58
59 source /usr/share/Modules/init/csh
60 module load modulefile modulefile ...
61
62 Bourne Shell (sh) (and derivatives):
63
64 . /usr/share/Modules/init/sh
65 module load modulefile modulefile ...
66
67 Perl:
68
69 require "/usr/share/Modules/init/perl.pm";
70 &module('load', 'modulefile', 'modulefile', '...');
71
72 Python:
73
74 import os
75 exec(open('/usr/share/Modules/init/python.py').read())
76 module('load', 'modulefile', 'modulefile', '...')
77
78 Bourne Shell (sh) (and derivatives) with autoinit sub-command:
79
80 eval "`/usr/share/Modules/libexec/modulecmd.tcl sh autoinit`"
81
82 Modulecmd startup
83 Upon invocation modulecmd.tcl sources a site-specific configuration
84 script if it exists. The location for this script is /etc/environment-
85 modules/siteconfig.tcl. An additional siteconfig script may be speci‐
86 fied with the $MODULES_SITECONFIG environment variable, if allowed by
87 modulecmd.tcl configuration, and will be loaded if it exists after
88 /etc/environment-modules/siteconfig.tcl. Siteconfig is a Tcl script
89 that enables to supersede any global variable or procedure definition
90 of modulecmd.tcl.
91
92 Afterward, modulecmd.tcl sources rc files which contain global, user
93 and modulefile specific setups. These files are interpreted as module‐
94 files. See modulefile(4) for detailed information.
95
96 Upon invocation of modulecmd.tcl module run-command files are sourced
97 in the following order:
98
99 1. Global RC file as specified by $MODULERCFILE or /etc/environment-
100 modules/rc. If $MODULERCFILE points to a directory, the modulerc
101 file in this directory is used as global RC file.
102
103 2. User specific module RC file $HOME/.modulerc
104
105 3. All .modulerc and .version files found during modulefile seeking.
106
107 Command line switches
108 The module command accepts command line switches as its first parame‐
109 ter. These may be used to control output format of all information
110 displayed and the module behavior in case of locating and interpreting
111 modulefiles.
112
113 All switches may be entered either in short or long notation. The fol‐
114 lowing switches are accepted:
115
116 --help, -h
117 Give some helpful usage information, and terminates the command.
118
119 --version, -V
120 Lists the current version of the module command. The command then
121 terminates without further processing.
122
123 --debug, -D
124 Debug mode. Causes module to print debugging messages about its
125 progress.
126
127 --verbose, -v
128 Enable verbose messages during module command execution.
129
130 --silent, -s
131 Turn off error, warning and informational messages. module command
132 output result is not affected by silent mode.
133
134 --paginate
135 Pipe all message output into less (or if set, $MODULES_PAGER) if
136 error output stream is a terminal. See also MODULES_PAGER section.
137
138 --no-pager
139 Do not pipe message output into a pager.
140
141 --color[=WHEN]
142 Colorize the output. WHEN defaults to always or can be never or
143 auto. See also MODULES_COLOR section.
144
145 --auto
146 On load, unload and switch sub-commands, enable automated module
147 handling mode. See also MODULES_AUTO_HANDLING section.
148
149 --no-auto
150 On load, unload and switch sub-commands, disable automated module
151 handling mode. See also MODULES_AUTO_HANDLING section.
152
153 --force, -f
154 On load, unload and switch sub-commands, by-pass any unsatisfied
155 modulefile constraint corresponding to the declared prereq and con‐
156 flict. Which means for instance that a modulefile will be loaded
157 even if it comes in conflict with another loaded modulefile or that
158 a modulefile will be unloaded even if it is required as a prereq by
159 another modulefile.
160
161 On clear sub-command, skip the confirmation dialog and proceed.
162
163 --terse, -t
164 Display avail, list and savelist output in short format.
165
166 --long, -l
167 Display avail, list and savelist output in long format.
168
169 --default, -d
170 On avail sub-command, display only the default version of each mod‐
171 ule name. Default version is the explicitly set default version or
172 also the implicit default version if config option implicit_default
173 is enabled (see Locating Modulefiles section in the modulefile(4)
174 man page for further details on implicit default version).
175
176 --latest, -L
177 On avail sub-command, display only the highest numerically sorted
178 version of each module name (see Locating Modulefiles section in the
179 modulefile(4) man page).
180
181 --starts-with, -S
182 On avail sub-command, return modules whose name starts with search
183 query string.
184
185 --contains, -C
186 On avail sub-command, return modules whose fully qualified name con‐
187 tains search query string.
188
189 --indepth
190 On avail sub-command, include in search results the matching module‐
191 files and directories and recursively the modulefiles and directo‐
192 ries contained in these matching directories.
193
194 --no-indepth
195 On avail sub-command, limit search results to the matching module‐
196 files and directories found at the depth level expressed by the
197 search query. Thus modulefiles contained in directories part of the
198 result are excluded.
199
200 Module Sub-Commands
201 help [modulefile...]
202 Print the usage of each sub-command. If an argument is given, print
203 the Module-specific help information for the modulefile.
204
205 add modulefile...
206 See load.
207
208 load [--auto|--no-auto] [-f] modulefile...
209 Load modulefile into the shell environment.
210
211 rm modulefile...
212 See unload.
213
214 unload [--auto|--no-auto] [-f] modulefile...
215 Remove modulefile from the shell environment.
216
217 swap [modulefile1] modulefile2
218 See switch.
219
220 switch [--auto|--no-auto] [-f] [modulefile1] modulefile2
221 Switch loaded modulefile1 with modulefile2. If modulefile1 is not
222 specified, then it is assumed to be the currently loaded module with
223 the same root name as modulefile2.
224
225 show modulefile...
226 See display.
227
228 display modulefile...
229 Display information about one or more modulefiles. The display
230 sub-command will list the full path of the modulefile and the envi‐
231 ronment changes the modulefile will make if loaded. (Note: It will
232 not display any environment changes found within conditional state‐
233 ments.)
234
235 list [-t|-l]
236 List loaded modules.
237
238 avail [-d|-L] [-t|-l] [-S|-C] [--indepth|--no-indepth] [path...]
239 List all available modulefiles in the current MODULEPATH. All direc‐
240 tories in the MODULEPATH are recursively searched for files contain‐
241 ing the modulefile magic cookie. If an argument is given, then each
242 directory in the MODULEPATH is searched for modulefiles whose path‐
243 name, symbolic version-name or alias match the argument. Argument
244 may contain wildcard characters. Multiple versions of an application
245 can be supported by creating a subdirectory for the application con‐
246 taining modulefiles for each version.
247
248 Symbolic version-names and aliases found in the search are displayed
249 in the result of this sub-command. Symbolic version-names are dis‐
250 played next to the modulefile they are assigned to within parenthe‐
251 sis. Aliases are listed in the MODULEPATH section where they have
252 been defined. To distinguish aliases from modulefiles a @ symbol is
253 added within parenthesis next to their name. Aliases defined through
254 a global or user specific module RC file are listed under the
255 global/user modulerc section.
256
257 When colored output is enabled and a specific graphical rendition is
258 defined for module default version, the default symbol is omitted
259 and instead the defined graphical rendition is applied to the rela‐
260 tive modulefile. When colored output is enabled and a specific
261 graphical rendition is defined for module alias, the @ symbol is
262 omitted. The defined graphical rendition applies to the module alias
263 name. See MODULES_COLOR and MODULES_COLORS sections for details on
264 colored output.
265
266 aliases
267 List all available symbolic version-names and aliases in the current
268 MODULEPATH. All directories in the MODULEPATH are recursively
269 searched in the same manner than for the avail sub-command. Only the
270 symbolic version-names and aliases found in the search are dis‐
271 played.
272
273 use [-a|--append] directory...
274 Prepend one or more directories to the MODULEPATH environment vari‐
275 able. The --append flag will append the directory to MODULEPATH.
276
277 Reference counter environment variable MODULEPATH_modshare is also
278 set to increase the number of times directory has been added to MOD‐
279 ULEPATH.
280
281 unuse directory...
282 Remove one or more directories from the MODULEPATH environment vari‐
283 able if reference counter of these directories is equal to 1 or
284 unknown.
285
286 Reference counter of directory in MODULEPATH denotes the number of
287 times directory has been enabled. When attempting to remove direc‐
288 tory from MODULEPATH, reference counter variable MODULEPATH_modshare
289 is checked and directory is removed only if its relative counter is
290 equal to 1 or not defined. Elsewhere directory is kept and reference
291 counter is decreased by 1.
292
293 refresh
294 See reload.
295
296 reload
297 Unload then load all loaded modulefiles.
298
299 No unload then load is performed and an error is returned if the
300 loaded modulefiles have unsatisfied constraint corresponding to the
301 prereq and conflict they declare.
302
303 purge
304 Unload all loaded modulefiles.
305
306 clear [-f]
307 Force the Modules package to believe that no modules are currently
308 loaded. A confirmation is requested if command-line switch -f (or
309 --force) is not passed. Typed confirmation should equal to yes or y
310 in order to proceed.
311
312 source scriptfile...
313 Execute scriptfile into the shell environment. scriptfile must be
314 written with modulefile syntax and specified with a fully qualified
315 path. Once executed scriptfile is not marked loaded in shell envi‐
316 ronment which differ from load sub-command.
317
318 whatis [modulefile...]
319 Display the information set up by the module-whatis commands inside
320 the specified modulefiles. These specified modulefiles may be
321 expressed using wildcard characters. If no modulefile is specified,
322 all module-whatis lines will be shown.
323
324 apropos string
325 See search.
326
327 keyword string
328 See search.
329
330 search string
331 Seeks through the module-whatis informations of all modulefiles for
332 the specified string. All module-whatis informations matching the
333 string will be displayed. string may contain wildcard characters.
334
335 test modulefile...
336 Execute and display results of the Module-specific tests for the
337 modulefile.
338
339 save [collection]
340 Record the currently set MODULEPATH directory list and the currently
341 loaded modulefiles in a collection file under the user's collection
342 directory $HOME/.module. If collection name is not specified, then
343 it is assumed to be the default collection. If collection is a fully
344 qualified path, it is saved at this location rather than under the
345 user's collection directory.
346
347 If MODULES_COLLECTION_TARGET is set, a suffix equivalent to the
348 value of this variable will be appended to the collection file name.
349
350 By default, if loaded modulefile corresponds to the explicitly
351 defined default module version, the bare module name is recorded. If
352 config option implicit_default is enabled, the bare module name is
353 also recorded for the implicit default module version. If MOD‐
354 ULES_COLLECTION_PIN_VERSION is set to 1, module version is always
355 recorded even if it is the default version.
356
357 No collection is recorded and an error is returned if the loaded
358 modulefiles have unsatisfied constraint corresponding to the prereq
359 and conflict they declare.
360
361 restore [collection]
362 Restore the environment state as defined in collection. If collec‐
363 tion name is not specified, then it is assumed to be the default
364 collection. If collection is a fully qualified path, it is restored
365 from this location rather than from a file under the user's collec‐
366 tion directory. If MODULES_COLLECTION_TARGET is set, a suffix equiv‐
367 alent to the value of this variable is appended to the collection
368 file name to restore.
369
370 When restoring a collection, the currently set MODULEPATH directory
371 list and the currently loaded modulefiles are unused and unloaded
372 then used and loaded to exactly match the MODULEPATH and loaded mod‐
373 ulefiles lists saved in this collection file. The order of the paths
374 and modulefiles set in collection is preserved when restoring. It
375 means that currently loaded modules are unloaded to get the same
376 LOADEDMODULES root than collection and currently used module paths
377 are unused to get the same MODULEPATH root. Then missing module
378 paths are used and missing modulefiles are loaded.
379
380 If a module, without a default version explicitly defined, is
381 recorded in a collection by its bare name: loading this module when
382 restoring the collection will fail if config option implicit_default
383 is disabled.
384
385 saverm [collection]
386 Delete the collection file under the user's collection directory. If
387 collection name is not specified, then it is assumed to be the
388 default collection. If MODULES_COLLECTION_TARGET is set, a suffix
389 equivalent to the value of this variable will be appended to the
390 collection file name.
391
392 saveshow [collection]
393 Display the content of collection. If collection name is not speci‐
394 fied, then it is assumed to be the default collection. If collection
395 is a fully qualified path, this location is displayed rather than a
396 collection file under the user's collection directory. If MOD‐
397 ULES_COLLECTION_TARGET is set, a suffix equivalent to the value of
398 this variable will be appended to the collection file name.
399
400 savelist [-t|-l]
401 List collections that are currently saved under the user's collec‐
402 tion directory. If MODULES_COLLECTION_TARGET is set, only collec‐
403 tions matching the target suffix will be displayed.
404
405 initadd modulefile...
406 Add modulefile to the shell's initialization file in the user's home
407 directory. The startup files checked (in order) are:
408
409 C Shell
410 .modules, .cshrc, .csh_variables and .login
411
412 TENEX C Shell
413 .modules, .tcshrc, .cshrc, .csh_variables and .login
414
415 Bourne and Korn Shells
416 .modules, .profile
417
418 GNU Bourne Again Shell
419 .modules, .bash_profile, .bash_login, .profile and .bashrc
420
421 Z Shell
422 .modules, .zshrc, .zshenv and .zlogin
423
424 Friendly Interactive Shell
425 .modules, .config/fish/config.fish
426
427 If a module load line is found in any of these files, the module‐
428 files are appended to any existing list of modulefiles. The module
429 load line must be located in at least one of the files listed above
430 for any of the init sub-commands to work properly. If the module
431 load line is found in multiple shell initialization files, all of
432 the lines are changed.
433
434 initprepend modulefile...
435 Does the same as initadd but prepends the given modules to the
436 beginning of the list.
437
438 initrm modulefile...
439 Remove modulefile from the shell's initialization files.
440
441 initswitch modulefile1 modulefile2
442 Switch modulefile1 with modulefile2 in the shell's initialization
443 files.
444
445 initlist
446 List all of the modulefiles loaded from the shell's initialization
447 file.
448
449 initclear
450 Clear all of the modulefiles from the shell's initialization files.
451
452 path modulefile
453 Print path to modulefile.
454
455 paths modulefile
456 Print path of available modulefiles matching argument.
457
458 append-path [-d C|--delim C|--delim=C] [--duplicates] variable value...
459 Append value to environment variable. The variable is a colon, or
460 delimiter, separated list. See append-path in the modulefile(4) man
461 page for further explanation.
462
463 prepend-path [-d C|--delim C|--delim=C] [--duplicates] variable
464 value...
465 Prepend value to environment variable. The variable is a colon, or
466 delimiter, separated list. See prepend-path in the modulefile(4) man
467 page for further explanation.
468
469 remove-path [-d C|--delim C|--delim=C] [--index] variable value...
470 Remove value from the colon, or delimiter, separated list in envi‐
471 ronment variable. See remove-path in the modulefile(4) man page for
472 further explanation.
473
474 is-loaded [modulefile...]
475 Returns a true value if any of the listed modulefiles has been
476 loaded or if any modulefile is loaded in case no argument is pro‐
477 vided. Returns a false value elsewhere. See is-loaded in the module‐
478 file(4) man page for further explanation.
479
480 is-saved [collection...]
481 Returns a true value if any of the listed collections exists or if
482 any collection exists in case no argument is provided. Returns a
483 false value elsewhere. See is-saved in the modulefile(4) man page
484 for further explanation.
485
486 is-used [directory...]
487 Returns a true value if any of the listed directories has been
488 enabled in MODULEPATH or if any directory is enabled in case no
489 argument is provided. Returns a false value elsewhere. See is-used
490 in the modulefile(4) man page for further explanation.
491
492 is-avail modulefile...
493 Returns a true value if any of the listed modulefiles exists in
494 enabled MODULEPATH. Returns a false value elsewhere. See is-avail in
495 the modulefile(4) man page for further explanation.
496
497 info-loaded modulefile
498 Returns the names of currently loaded modules matching passed mod‐
499 ulefile. Returns an empty string if passed modulefile does not
500 match any loaded modules. See module-info loaded in the module‐
501 file(4) man page for further explanation.
502
503 config [--dump-state|name [value]|--reset name]
504 Gets or sets modulecmd.tcl options. Reports the currently set value
505 of passed option name or all existing options if no name passed. If
506 a name and a value are provided, the value of option name is set to
507 value. If command-line switch --reset is passed in addition to a
508 name, overridden overridden value for option name is cleared.
509
510 When a reported option value differs from default value a mention is
511 added to indicate whether the overridden value is coming from a com‐
512 mand-line switch (cmd-line) or from an environment variable
513 (env-var). When a reported option value is locked and cannot be
514 altered a (locked) mention is added.
515
516 If no value is currently set for an option name, the mention <undef>
517 is reported.
518
519 When command-line switch --dump-state is passed, current mod‐
520 ulecmd.tcl state and Modules-related environment variables are
521 reported in addition to currently set modulecmd.tcl options.
522
523 Existing option names are:
524
525 · auto_handling: automated module handling mode (defines environment
526 variable MODULES_AUTO_HANDLING when set)
527
528 · avail_indepth: avail sub-command in depth search mode (defines
529 MODULES_AVAIL_INDEPTH)
530
531 · avail_report_dir_sym: display symbolic versions targeting directo‐
532 ries on avail sub-command
533
534 · avail_report_mfile_sym: display symbolic versions targeting mod‐
535 ulefiles on avail sub-command
536
537 · collection_pin_version: register exact modulefile version in col‐
538 lection (defines MODULES_COLLECTION_PIN_VERSION)
539
540 · collection_target: collection target which is valid for current
541 system (defines MODULES_COLLECTION_TARGET)
542
543 · color: colored output mode (defines MODULES_COLOR)
544
545 · colors: chosen colors to highlight output items (defines MOD‐
546 ULES_COLORS)
547
548 · contact: modulefile contact address (defines MODULECONTACT)
549
550 · extra_siteconfig: additional site-specific configuration script
551 location (defines MODULES_SITECONFIG)
552
553 · ignored_dirs: directories ignored when looking for modulefiles
554
555 · implicit_default: set an implicit default version for modules
556 (defines MODULES_IMPLICIT_DEFAULT)
557
558 · locked_configs: configuration options that cannot be superseded
559
560 · pager: text viewer to paginate message output (defines MOD‐
561 ULES_PAGER)
562
563 · rcfile: global run-command file location (defines MODULERCFILE)
564
565 · run_quarantine: environment variables to indirectly pass to mod‐
566 ulecmd.tcl (defines MODULES_RUN_QUARANTINE)
567
568 · silent_shell_debug: disablement of shell debugging property for
569 the module command (defines MODULES_SILENT_SHELL_DEBUG)
570
571 · search_match: module search match style (defines MOD‐
572 ULES_SEARCH_MATCH)
573
574 · set_shell_startup: ensure module command definition by setting
575 shell startup file (defines MODULES_SET_SHELL_STARTUP)
576
577 · siteconfig: primary site-specific configuration script location
578
579 · tcl_ext_lib: Modules Tcl extension library location
580
581 · term_background: terminal background color kind (defines MOD‐
582 ULES_TERM_BACKGROUND)
583
584 · unload_match_order: unload firstly loaded or lastly loaded module
585 matching request (defines MODULES_UNLOAD_MATCH_ORDER)
586
587 · verbosity: module command verbosity level (defines MODULES_VER‐
588 BOSITY)
589
590 The options avail_report_dir_sym, avail_report_mfile_sym, ignored_dirs,
591 locked_configs, siteconfig and tcl_ext_lib cannot be altered. Moreover
592 all options referred in locked_configs value are locked thus they can‐
593 not be altered.
594
595 Modulefiles
596 modulefiles are written in the Tool Command Language (Tcl) and are
597 interpreted by modulecmd.tcl. modulefiles can use conditional state‐
598 ments. Thus the effect a modulefile will have on the environment may
599 change depending upon the current state of the environment.
600
601 Environment variables are unset when unloading a modulefile. Thus, it
602 is possible to load a modulefile and then unload it without having the
603 environment variables return to their prior state.
604
605 Collections
606 Collections describe a sequence of module use then module load commands
607 that are interpreted by modulecmd.tcl to set the user environment as
608 described by this sequence. When a collection is activated, with the
609 restore sub-command, module paths and loaded modules are unused or
610 unloaded if they are not part or if they are not ordered the same way
611 as in the collection.
612
613 Collections are generated by the save sub-command that dumps the cur‐
614 rent user environment state in terms of module paths and loaded mod‐
615 ules. By default collections are saved under the $HOME/.module direc‐
616 tory.
617
618 Collections may be valid for a given target if they are suffixed. In
619 this case these collections can only be restored if their suffix corre‐
620 spond to the current value of the MODULES_COLLECTION_TARGET environment
621 variable (see the dedicated section of this topic below).
622
624 The module command exits with 0 if its execution succeed. Elsewhere 1
625 is returned.
626
628 LOADEDMODULES
629 A colon separated list of all loaded modulefiles.
630
631 MODULECONTACT
632 Email address to contact in case any issue occurs during the inter‐
633 pretation of modulefiles.
634
635 MODULEPATH
636 The path that the module command searches when looking for module‐
637 files. Typically, it is set to the master modulefiles directory,
638 /usr/share/Modules/modulefiles, by the initialization script. MOD‐
639 ULEPATH can be set using module use or by the module initialization
640 script to search group or personal modulefile directories before or
641 after the master modulefile directory.
642
643 Path elements registered in the MODULEPATH environment variable may
644 contain reference to environment variables which are converted to
645 their corresponding value by module command each time it looks at
646 the MODULEPATH value. If an environment variable referred in a path
647 element is not defined, its reference is converted to an empty
648 string.
649
650 MODULERCFILE
651 The location of a global run-command file containing modulefile spe‐
652 cific setup. See Modulecmd startup section for detailed information.
653
654 MODULESHOME
655 The location of the master Modules package file directory containing
656 module command initialization scripts, the executable program mod‐
657 ulecmd.tcl, and a directory containing a collection of master mod‐
658 ulefiles.
659
660 MODULES_AUTO_HANDLING
661 If set to 1, enable automated module handling mode. If set to 0 dis‐
662 able automated module handling mode. Other values are ignored.
663
664 Automated module handling mode consists in additional actions trig‐
665 gered when loading or unloading a modulefile to satisfy the con‐
666 straints it declares. When loading a modulefile, following actions
667 are triggered:
668
669 · Requirement Load: load of the modulefiles declared as a prereq of
670 the loading modulefile.
671
672 · Dependent Reload: reload of the modulefiles declaring a prereq
673 onto loaded modulefile or declaring a prereq onto a modulefile
674 part of this reloading batch.
675
676 When unloading a modulefile, following actions are triggered:
677
678 · Dependent Unload: unload of the modulefiles declaring a
679 non-optional prereq onto unloaded modulefile or declaring a
680 non-optional prereq onto a modulefile part of this unloading
681 batch. A prereq modulefile is considered optional if the prereq
682 definition order is made of multiple modulefiles and at least one
683 alternative modulefile is loaded.
684
685 · Useless Requirement Unload: unload of the prereq modulefiles that
686 have been automatically loaded for either the unloaded modulefile,
687 an unloaded dependent modulefile or a modulefile part of this use‐
688 less requirement unloading batch. Modulefiles are added to this
689 unloading batch only if they are not required by any other loaded
690 modulefiles.
691
692 · Dependent Reload: reload of the modulefiles declaring a conflict
693 or an optional prereq onto either the unloaded modulefile, an
694 unloaded dependent or an unloaded useless requirement or declaring
695 a prereq onto a modulefile part of this reloading batch.
696
697 In case a loaded modulefile has some of its declared constraints
698 unsatisfied (pre-required modulefile not loaded or conflicting mod‐
699 ulefile loaded for instance), this loaded modulefile is excluded
700 from the automatic reload actions described above.
701
702 For the specific case of the switch sub-command, where a modulefile
703 is unloaded to then load another modulefile. Dependent modulefiles
704 to Unload are merged into the Dependent modulefiles to Reload that
705 are reloaded after the load of the switched-to modulefile.
706
707 Automated module handling mode enablement is defined in the follow‐
708 ing order of preference: --auto/--no-auto command line switches,
709 then MODULES_AUTO_HANDLING environment variable, then the default
710 set in modulecmd.tcl script configuration. Which means MOD‐
711 ULES_AUTO_HANDLING overrides default configuration and
712 --auto/--no-auto command line switches override every other ways to
713 enable or disable this mode.
714
715 MODULES_AVAIL_INDEPTH
716 If set to 1, enable in depth search results for avail sub-command.
717 If set to 0 disable avail sub-command in depth mode. Other values
718 are ignored.
719
720 When in depth mode is enabled, modulefiles and directories contained
721 in directories matching search query are also included in search
722 results. When disabled these modulefiles and directories contained
723 in matching directories are excluded.
724
725 avail sub-command in depth mode enablement is defined in the follow‐
726 ing order of preference: --indepth/--no-indepth command line
727 switches, then MODULES_AVAIL_INDEPTH environment variable, then the
728 default set in modulecmd.tcl script configuration. Which means MOD‐
729 ULES_AVAIL_INDEPTH overrides default configuration and
730 --indepth/--no-indepth command line switches override every other
731 ways to enable or disable this mode.
732
733 MODULES_CMD
734 The location of the active module command script.
735
736 MODULES_COLLECTION_PIN_VERSION
737 If set to 1, register exact version number of modulefiles when sav‐
738 ing a collection. Elsewhere modulefile version number is omitted if
739 it corresponds to the explicitly set default version and also to the
740 implicit default when config option implicit_default is enabled.
741
742 MODULES_COLLECTION_TARGET
743 The collection target that determines what collections are valid
744 thus reachable on the current system.
745
746 Collection directory may sometimes be shared on multiple machines
747 which may use different modules setup. For instance modules users
748 may access with the same HOME directory multiple systems using dif‐
749 ferent OS versions. When it happens a collection made on machine 1
750 may be erroneous on machine 2.
751
752 When a target is set, only the collections made for that target are
753 available to the restore, savelist, saveshow and saverm sub-com‐
754 mands. Saving collection registers the target footprint by suffixing
755 the collection filename with .$MODULES_COLLECTION_TARGET. Collection
756 target is not involved when collection is specified as file path on
757 the saveshow, restore and save sub-commands.
758
759 For example, the MODULES_COLLECTION_TARGET variable may be set with
760 results from commands like lsb_release, hostname, dnsdomainname,
761 etc.
762
763 MODULES_COLOR
764 Defines if output should be colored or not. Accepted values are
765 never, auto and always.
766
767 When color mode is set to auto, output is colored only if the stan‐
768 dard error output channel is attached to a terminal.
769
770 Colored output enablement is defined in the following order of pref‐
771 erence: --color command line switch, then MODULES_COLOR environment
772 variable, then CLICOLOR and CLICOLOR_FORCE environment variables,
773 then the default set in modulecmd.tcl script configuration. Which
774 means MODULES_COLOR overrides default configuration and the CLI‐
775 COLOR/CLICOLOR_FORCE variables. --color command line switch over‐
776 rides every other ways to enable or disable this mode.
777
778 CLICOLOR and CLICOLOR_FORCE environment variables are also honored
779 to define color mode. The never mode is set if CLICOLOR equals to 0.
780 If CLICOLOR is set to another value, it corresponds to the auto
781 mode. The always mode is set if CLICOLOR_FORCE is set to a value
782 different than 0. Color mode set with these two variables is super‐
783 seded by mode set with MODULES_COLOR environment variable.
784
785 MODULES_COLORS
786 Specifies the colors and other attributes used to highlight various
787 parts of the output. Its value is a colon-separated list of output
788 items associated to a Select Graphic Rendition (SGR) code. It fol‐
789 lows the same syntax than LS_COLORS.
790
791 Output items are designated by keys. Items able to be colorized are:
792 highlighted element (hi), debug information (db), tag separator
793 (se); Error (er), warning (wa), module error (me) and info (in) mes‐
794 sage prefixes; Modulepath (mp), directory (di), module alias (al),
795 module symbolic version (sy), module default version (de) and mod‐
796 ulefile command (cm).
797
798 See the Select Graphic Rendition (SGR) section in the documentation
799 of the text terminal that is used for permitted values and their
800 meaning as character attributes. These substring values are integers
801 in decimal representation and can be concatenated with semicolons.
802 Modules takes care of assembling the result into a complete SGR
803 sequence (33[...m). Common values to concatenate include 1 for bold,
804 4 for underline, 30 to 37 for foreground colors and 90 to 97 for
805 16-color mode foreground colors. See also
806 https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
807 for a complete SGR code reference.
808
809 No graphical rendition will be applied to an output item that could
810 normaly be colored but which is not defined in the color set. Thus
811 if MODULES_COLORS is defined empty, no output will be colored at
812 all.
813
814 The color set is defined for Modules in the following order of pref‐
815 erence: MODULES_COLORS environment variable, then the default set in
816 modulecmd.tcl script configuration. Which means MODULES_COLORS over‐
817 rides default configuration.
818
819 MODULES_IMPLICIT_DEFAULT
820 Defines (if set to 1) or not (if set to 0) an implicit default ver‐
821 sion for modules without a default version explicitly defined (see
822 Locating Modulefiles section in the modulefile(4) man page).
823
824 Without either an explicit or implicit default version defined a
825 module must be fully qualified (version should be specified in addi‐
826 tion to its name) to get:
827
828 · targeted by module load, switch, display, help, test and path
829 sub-commands.
830
831 · restored from a collection, unless already loaded in collec‐
832 tion-specified order.
833
834 · automatically loaded by automated module handling mechanisms (see
835 MODULES_AUTO_HANDLING section) when declared as module require‐
836 ment, with prereq or module load modulefile commands.
837
838 An error is returned in the above situations if either no explicit
839 or implicit default version is defined.
840
841 This environment variable supersedes the value of the configuration
842 option implicit_default set in modulecmd.tcl script. This environ‐
843 ment variable is ignored if implicit_default has been declared
844 locked in locked_configs configuration option.
845
846 MODULES_LMALTNAME
847 A colon separated list of the alternative names set through mod‐
848 ule-version and module-alias statements corresponding to all loaded
849 modulefiles. Each element in this list starts by the name of the
850 loaded modulefile followed by all alternative names resolving to it.
851 The loaded modulefile and its alternative names are separated by the
852 ampersand character.
853
854 This environment variable is intended for module command internal
855 use to get knowledge of the alternative names matching loaded mod‐
856 ulefiles in order to keep environment consistent when conflicts or
857 pre-requirements are set over these alternative designations. It
858 also helps to find a match after modulefiles being loaded when
859 unload, is-loaded or info-loaded actions are run over these names.
860
861 MODULES_LMCONFLICT
862 A colon separated list of the conflict statements defined by all
863 loaded modulefiles. Each element in this list starts by the name of
864 the loaded modulefile declaring the conflict followed by the name of
865 all modulefiles it declares a conflict with. These loaded module‐
866 files and conflicting modulefile names are separated by the amper‐
867 sand character.
868
869 This environment variable is intended for module command internal
870 use to get knowledge of the conflicts declared by the loaded module‐
871 files in order to keep environment consistent when a conflicting
872 module is asked for load afterward.
873
874 MODULES_LMNOTUASKED
875 A colon separated list of all loaded modulefiles that were not
876 explicitly asked for load from the command-line.
877
878 This environment variable is intended for module command internal
879 use to distinguish the modulefiles that have been loaded automati‐
880 cally from modulefiles that have been asked by users.
881
882 MODULES_LMPREREQ
883 A colon separated list of the prereq statements defined by all
884 loaded modulefiles. Each element in this list starts by the name of
885 the loaded modulefile declaring the pre-requirement followed by the
886 name of all modulefiles it declares a prereq with. These loaded mod‐
887 ulefiles and pre-required modulefile names are separated by the
888 ampersand character. When a prereq statement is composed of multiple
889 modulefiles, these modulefile names are separated by the pipe char‐
890 acter.
891
892 This environment variable is intended for module command internal
893 use to get knowledge of the pre-requirement declared by the loaded
894 modulefiles in order to keep environment consistent when a
895 pre-required module is asked for unload afterward.
896
897 MODULES_PAGER
898 Text viewer for use to paginate message output if error output
899 stream is attached to a terminal. The value of this variable is com‐
900 posed of a pager command name or path eventually followed by com‐
901 mand-line options.
902
903 Paging command and options are defined for Modules in the following
904 order of preference: MODULES_PAGER environment variable, then the
905 default set in modulecmd.tcl script configuration. Which means MOD‐
906 ULES_PAGER overrides default configuration.
907
908 If MODULES_PAGER variable is set to an empty string or to the value
909 cat, pager will not be launched.
910
911 MODULES_RUNENV_<VAR>
912 Value to set to environment variable <VAR> for modulecmd.tcl
913 run-time execution if <VAR> is referred in MODULES_RUN_QUARANTINE.
914
915 MODULES_RUN_QUARANTINE
916 A space separated list of environment variable names that should be
917 passed indirectly to modulecmd.tcl to protect its run-time environ‐
918 ment from side-effect coming from their current definition.
919
920 Each variable found in MODULES_RUN_QUARANTINE will have its value
921 emptied or set to the value of the corresponding MOD‐
922 ULES_RUNENV_<VAR> variable when defining modulecmd.tcl run-time
923 environment.
924
925 Original values of these environment variables set in quarantine are
926 passed to modulecmd.tcl via <VAR>_modquar variables.
927
928 MODULES_SEARCH_MATCH
929 When searching for modules with avail sub-command, defines the way
930 query string should match against available module names. With
931 starts_with value, returned modules are those whose name begins by
932 search query string. When set to contains, any modules whose fully
933 qualified name contains search query string are returned.
934
935 Module search match style is defined in the following order of pref‐
936 erence: --starts-with and --contains command line switches, then
937 MODULES_SEARCH_MATCH environment variable, then the default set in
938 modulecmd.tcl script configuration. Which means MODULES_SEARCH_MATCH
939 overrides default configuration and --starts-with/--contains command
940 line switches overrides every other ways to set search match style.
941
942 MODULES_SET_SHELL_STARTUP
943 If set to 1, defines when module command initializes the shell
944 startup file to ensure that the module command is still defined in
945 sub-shells. Setting shell startup file means defining the ENV and
946 BASH_ENV environment variable to the Modules bourne shell initial‐
947 ization script. If set to 0, shell startup file is not defined.
948
949 MODULES_SILENT_SHELL_DEBUG
950 If set to 1, disable any xtrace or verbose debugging property set on
951 current shell session for the duration of either the module command
952 or the module shell initialization script. Only applies to Bourne
953 Shell (sh) and its derivatives.
954
955 MODULES_SITECONFIG
956 Location of a site-specific configuration script to source into mod‐
957 ulecmd.tcl. See also Modulecmd startup section.
958
959 This environment variable is ignored if extra_siteconfig has been
960 declared locked in locked_configs configuration option.
961
962 MODULES_TERM_BACKGROUND
963 Inform Modules of the terminal background color to determine if the
964 color set for dark background or the color set for light background
965 should be used to color output in case no specific color set is
966 defined with the MODULES_COLORS variable. Accepted values are dark
967 and light.
968
969 MODULES_UNLOAD_MATCH_ORDER
970 When a module unload request matches multiple loaded modules, unload
971 firstly loaded module or lastly loaded module. Accepted values are
972 returnfirst and returnlast.
973
974 MODULES_USE_COMPAT_VERSION
975 If set to 1 prior to Modules package initialization, enable Modules
976 compatibility version (3.2 release branch) rather main version at
977 initialization scripts running time. Modules package compatibility
978 version should be installed along with main version for this envi‐
979 ronment variable to have any effect.
980
981 MODULES_VERBOSITY
982 Defines the verbosity level of the module command. Available ver‐
983 bosity levels from the least to the most verbose are:
984
985 · silent: turn off error, warning and informational messages but
986 does not affect module command output result.
987
988 · concise: enable error and warning messages but disable informa‐
989 tional messages.
990
991 · normal: turn on informational messages, like a report of the addi‐
992 tional module evaluations triggered by loading or unloading mod‐
993 ules, aborted evaluation issues or a report of each module evalua‐
994 tion occurring during a restore or source sub-commands.
995
996 · verbose: add additional informational messages, like a systematic
997 report of the loading or unloading module evaluations.
998
999 · debug: print debugging messages about module command execution.
1000
1001 Module command verbosity is defined in the following order of pref‐
1002 erence: --silent, --verbose and --debug command line switches, then
1003 MODULES_VERBOSITY environment variable, then the default set in mod‐
1004 ulecmd.tcl script configuration. Which means MODULES_VERBOSITY over‐
1005 rides default configuration and --silent/--verbose/--debug command
1006 line switches overrides every other ways to set verbosity level.
1007
1008 _LMFILES_
1009 A colon separated list of the full pathname for all loaded module‐
1010 files.
1011
1012 <VAR>_modquar
1013 Value of environment variable <VAR> passed to modulecmd.tcl in order
1014 to restore <VAR> to this value once started.
1015
1016 <VAR>_modshare
1017 Reference counter variable for path-like variable <VAR>. A colon
1018 separated list containing pairs of elements. A pair is formed by a
1019 path element followed its usage counter which represents the number
1020 of times this path has been enabled in variable <VAR>. A colon sepa‐
1021 rates the two parts of the pair.
1022
1024 /usr/share/Modules
1025 The MODULESHOME directory.
1026
1027 /etc/environment-modules/siteconfig.tcl
1028 The site-specific configuration script of modulecmd.tcl. An addi‐
1029 tional configuration script could be defined using the MODULES_SITE‐
1030 CONFIG environment variable.
1031
1032 /etc/environment-modules/rc
1033 The system-wide modules rc file. The location of this file can be
1034 changed using the MODULERCFILE environment variable as described
1035 above.
1036
1037 $HOME/.modulerc
1038 The user specific modules rc file.
1039
1040 $HOME/.module
1041 The user specific collection directory.
1042
1043 /usr/share/Modules/modulefiles
1044 The directory for system-wide modulefiles. The location of the
1045 directory can be changed using the MODULEPATH environment variable
1046 as described above.
1047
1048 /usr/share/Modules/libexec/modulecmd.tcl
1049 The modulefile interpreter that gets executed upon each invocation
1050 of module.
1051
1052 /usr/share/Modules/init/<shell>
1053 The Modules package initialization file sourced into the user's
1054 environment.
1055
1057 modulefile(4)
1058
1060 1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen,
1061 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2019 Xavier Delaruelle
1062
1063
1064
1065
10664.3.0 2019-07-26 MODULE(1)