1MODULE(1)                   General Commands Manual                  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
18       environment  can  be  modified  on  a per-module basis using the module
19       command which interprets modulefiles.  Typically  modulefiles  instruct
20       the  module command to alter or set shell environment variables such as
21       PATH, MANPATH, etc.  modulefiles may be  shared  by  many  users  on  a
22       system and users may have their own collection to supplement or replace
23       the shared modulefiles.
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-
31       command 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,  either  as  an  alias  or  shell
37       function,  creates  Modules environment variables, and if enabled to do
38       so, a snapshow of the environment is saved as  either  (if  BEGINENV=1)
39       $HOME/.modulesbeginenv  or  (if  BEGINENV=99) whatever $MODULESBEGINENV
40       points to.
41
42       The module alias or function executes the modulecmd program and has the
43       shell  evaluate  the command's output.  The first argument to modulecmd
44       specifies the type of shell.
45
46       The initialization scripts are kept in $MODULESHOME/init/<shell>  where
47       <shell>  is  the  name of the sourcing shell.  The sh, csh, tcsh, bash,
48       ksh, and zsh shells are supported by modulecmd.   In  addition,  python
49       and  perl  "shells" are supported, which writes the environment changes
50       to stdout as python or perl code.
51
52
53   Modulecmd startup
54       Upon invocation modulecmd sources rc files which contain  global,  user
55       and   modulefile  specific  setups.  These  files  are  interpreted  as
56       modulefiles.  See modulefile(4) for detailed information.
57
58       Upon invocation of  modulecmd  module  RC  files  are  sourced  in  the
59       following order:
60
61            Global RC file as specified by ${MODULERCFILE} or
62                ${MODULESHOME}/etc/rc
63
64            User specific module RC file ${HOME}/.modulerc
65
66            All .modulerc and .version files found during modulefile
67                seeking.
68
69
70   Command line switches
71       The   module  command  accepts  command  line  switches  as  its  first
72       parameter.  These  may  be  used  to  control  output  format  of   all
73       information  displayed  and the module behavior in case of locating and
74       interpreting module files.
75
76       All switches may be entered either  in  short  or  long  notation.  The
77       following switches are accepted:
78
79       --help, -H
80              Give some helpful usage information, and terminates the command.
81
82       --version, -V
83              Lists  the  current  version  of  the  module  command, and some
84              configured option values.  The command then  terminates  without
85              further processing.
86
87       --force, -f
88              Force  active dependency resolution. This will result in modules
89              found on a prereq  command  inside  a  module  file  being  load
90              automatically.   Unloading  module  files using this switch will
91              result  in  all  required  modules  which   have   been   loaded
92              automatically  using the -f switch being unload.  This switch is
93              experimental at the moment.
94
95       --terse, -t
96              Display avail and list output in short format.
97
98       --long, -l
99              Display avail and list output in long format.
100
101       --human, -h
102              Display short output of the avail and  list  commands  in  human
103              readable format.
104
105       --verbose, -v
106              Enable verbose messages during module command execution.
107
108       --silent, -s
109              Disable verbose messages. Redirect stderr to /dev/null if stderr
110              is found not to be a tty. This is a  useful  option  for  module
111              commands  being  written  into .cshrc, .login or .profile files,
112              because some remote shells  (as  rsh(1))  and  remote  execution
113              commands (like rdist) get confused if there is output on stderr.
114
115       --create, -c
116              Create  caches  for module avail and module apropos. You must be
117              granted write access to the ${MODULEHOME}/modulefiles/ directory
118              if you try to invoke module with the -c option.
119
120       --icase, -i
121              Case  insensitive  module  parameter  evaluation. Currently only
122              implemented for the module apropos command.
123
124       --userlvl <lvl>, -u <lvl>
125              Set the user level to the specified value. The argument of  this
126              option may be one of:
127
128       novice, nov Novice
129
130       expert, exp Experienced module user
131
132       advanced, adv Advanced module user
133
134   Module Sub-Commands
135              help [modulefile...]
136                             Print  the  usage  of  each  sub-command.   If an
137                             argument is given, print the Module specific help
138                             information for the modulefile.
139
140              load modulefile [modulefile...]
141              add modulefile [modulefile...]
142                             Load modulefile into the shell environment.
143
144              unload modulefile [modulefile...]
145              rm modulefile [modulefile...]
146                             Remove modulefile from the shell environment.
147
148              switch [ modulefile1 ] modulefile2
149              swap [ modulefile1 ] modulefile2
150                             Switch  loaded  modulefile1 with modulefile2.  If
151                             modulefile1 is not specified, then it is  assumed
152                             to  be  the currently loaded module with the same
153                             root name as modulefile2.
154
155              display modulefile [modulefile...]
156              show modulefile [modulefile...]
157                             Display  information  about  a  modulefile.   The
158                             display  sub-command  will  list the full path of
159                             the  modulefile  and  all  (or   most)   of   the
160                             environment  changes  the modulefile will make if
161                             loaded.  (It will  not  display  any  environment
162                             changes found within conditional statements.)
163
164              list           List loaded modules.
165
166              avail [path...]
167                             List  all  available  modulefiles  in the current
168                             MODULEPATH.  All directories  in  the  MODULEPATH
169                             are recursively searched for files containing the
170                             modulefile  magic  cookie.   If  an  argument  is
171                             given,  then  each directory in the MODULEPATH is
172                             searched for modulefiles whose pathname match the
173                             argument.   Multiple  versions  of an application
174                             can be supported by creating a  subdirectory  for
175                             the  application  containing modulefiles for each
176                             version.
177
178              use directory [directory...]
179              use [-a|--append] directory [directory...]
180                             Prepend directory to the  MODULEPATH  environment
181                             variable.   The  --append  flag  will  append the
182                             directory to MODULEPATH.
183
184              unuse directory [directory...]
185                             Remove directory from the MODULEPATH  environment
186                             variable.
187
188              update         Attempt  to  reload  all loaded modulefiles.  The
189                             environment will be  reconfigured  to  match  the
190                             environment saved in ${HOME}/.modulesbeginenv (if
191                             BEGINENV=1)   or   the   file   pointed   at   by
192                             $MODULESBEGINEV    (if   BEGINENV=99)   and   the
193                             modulefiles will be reloaded.
194
195                             This is only valid if modules was configured with
196                             --enable-beginenv  (which  defines BEGINENV) else
197                             this will cause  a  warning.   update  will  only
198                             change   the   environment   variables  that  the
199                             modulefiles set.
200
201              clear          Force the Modules  Package  to  believe  that  no
202                             modules are currently loaded.
203
204              purge          Unload all loaded modulefiles.
205
206              refresh        Force  a refresh of all non-persistent components
207                             of currently loaded modules.  This should be used
208                             on  derived  shells  where  aliases  need  to  be
209                             reinitialized but the environment variables  have
210                             already been set by the currently loaded modules.
211
212              whatis [modulefile [modulefile...]]
213                             Display  the modulefile information set up by the
214                             module-whatis  commands  inside   the   specified
215                             modulefiles.  If no modulefiles are specified all
216                             whatis information lines will be shown.
217
218              apropos string
219              keyword string Seeks  thru  the  whatis  informations   of   all
220                             modulefiles for the specified string.  All module
221                             whatis informations matching  the  string  search
222                             will be displayed.
223              initadd modulefile [modulefile...]
224                             Add modulefile to the shell's initialization file
225                             in the user's home directory.  The startup  files
226                             checked (in order) are:
227                             csh - .modules, .cshrc(.ext), .csh_variables, and
228                             .login(.ext)
229                             tcsh   -   .modules,    .tcshrc,    .cshrc(.ext),
230                             .csh_variables, and .login(.ext)
231                             sh   and  ksh  -  .modules,  .profile(.ext),  and
232                             .kshenv(.ext)
233                             bash  -  .modules,  .bash_profile,   .bash_login,
234                             .profile(.ext), and .bashrc(.ext)
235                             zsh - .modules, .zcshrc(.ext), .zshenv(.ext), and
236                             .zlogin(.ext)
237
238                             If a 'module load' line is found in any of  these
239                             files,  the modulefile(s) is(are) appended to any
240                             existing list of modulefiles.  The 'module  load'
241                             line must be located in at least one of the files
242                             listed above for any of the  'init'  sub-commands
243                             to  work  properly.  If the 'module load' line is
244                             found in multiple shell initialization files, all
245                             of the lines are changed.
246              initprepend modulefile [modulefile...]
247                             Does  the  same as initadd but prepends the given
248                             modules to the beginning of the list.
249              initrm modulefile [modulefile...]
250                             Remove modulefile from the shell's initialization
251                             files.
252              initswitch modulefile1 modulefile2
253                             Switch   modulefile1   with  modulefile2  in  the
254                             shell's initialization files.
255              initlist       List all  of  the  modulefiles  loaded  from  the
256                             shell's initialization file.
257              initclear      Clear  all  of  the  modulefiles from the shell's
258                             initialization files.
259   Modulefiles
260       modulefiles are written in the Tool  Command  Language  (Tcl)  and  are
261       interpreted  by modulecmd.  modulefiles can use conditional statements.
262       Thus the effect a modulefile will have on the  environment  may  change
263       depending upon the current state of the environment.
264       Environment  variables are unset when unloading a modulefile.  Thus, it
265       is possible to load a modulefile and then unload it without having  the
266       environment variables return to their prior state.

ENVIRONMENT

268       MODULESHOME
269              The  location  of  the  master  Modules  package  file directory
270              containing module command initialization scripts, the executable
271              program  modulecmd,  and  a directory containing a collection of
272              master modulefiles.
273       MODULEPATH
274              The path that the  module  command  searches  when  looking  for
275              modulefiles.   Typically,  it  is  set to a default value by the
276              bootstrap procedure.  MODULEPATH can be set using  'module  use'
277              or  by  the  module  initialization  script  to  search group or
278              personal modulefile  directories  before  or  after  the  master
279              modulefile directory.
280       LOADEDMODULES
281              A colon separated list of all loaded modulefiles.
282       _LMFILES_
283              A  colon  separated  list  of  the  full pathname for all loaded
284              modulefiles.
285       MODULESBEGINENV
286              If modules has been configured (BEGINENV=99) to  test  for  this
287              environment  variable,  then if it exists, it is the name of the
288              file  to  store  the  the  initial  shell   environment.    This
289              environment  variable  will  have embedded environment variables
290              unrolled to one level.  The contents of this  variable  is  only
291              used the first time modules is invoked.
292       _MODULESBEGINENV_
293              The   filename   of   the  file  containing  the  initialization
294              environment snapshot.
295

FILES

297       /usr/share/Modules
298              The MODULESHOME directory.
299       ${MODULESHOME}/etc/rc
300              The system-wide modules rc file.  The location of this file  can
301              be  changed  using  the  MODULERCFILE  environment  variable  as
302              described above.
303       ${HOME}/.modulerc
304              The user specific modules rc file.
305       ${MODULESHOME}/modulefiles
306              The directory for system-wide modulefiles.  The location of  the
307              directory  can  be  changed  using  the  MODULEPATH  environment
308              variable as described above.
309       ${MODULESHOME}/bin/modulecmd
310              The  modulefile  interpreter  that  gets  executed   upon   each
311              invocation of module.
312       ${MODULESHOME}/init/<shell>
313              The  Modules package initialization file sourced into the user's
314              environment.
315       ${MODULEPATH}/.moduleavailcache
316              File containing the cached list  of  all  modulefiles  for  each
317              directory  in  the  MODULEPATH  (only  when  the  avail cache is
318              enabled via  the  configure  option  --enable-cache  which  sets
319              CACHE_AVAIL).
320       ${MODULEPATH}/.moduleavailcachedir
321              File  containing  the  names and modification times for all sub-
322              directories with an avail cache (see above).
323       ${HOME}/.modulesbeginenv
324              A  snapshot  of  the  user's   environment   taken   at   Module
325              initialization.   This  information is used by the module update
326              sub-command (if BEGINENV=1), else
327       $MODULESBEGINENV
328              If this defines a valid filename, this serves the  same  purpose
329              as above (if BEGINENV=99).

VERSION

331       3.2.6

SEE ALSO

333       modulefile(4)
334
335
336
337                                10 October 2005                      MODULE(1)
Impressum