Module command

The module command on Hippu servers sets so called environment variables and makes certain programs available. Such a system is needed in order to enable the use of different versions of the same programs and to minimize the interference between software packages. Appropriate settings of the environment variables lets the user to access the right versions of programs and direct the programs to use files compatible with that version of the program.

Many linguistic modules can be enabled via the Module system, e.g. HFST programs, OMorFI morphological analyser, not to mention versions of programming languages such as Python (where it makes a difference whether one uses the version 2.6 or 3).

One can get general help information about Module by module help and see what modules are currently loaded by module list . In order to see what modules there are altogether, one can use the command module avail (the list is rather long, however). In order to get selective listings of available programs, one may use e.g. the following:

$ module available 2>&1 -l | egrep hfst
hfst/2.4                                             2010/03/16 13:17:01
hfst/2.4.1                                           2010/11/01 16:29:35
hfst/3                                               2010/08/27  6:35:40
The -l option selects the longer format listing where each program is listed on its own line. The 2>&1 is a special trick in shell commands to merge the so called strderr output and the stdin output so that the output can be piped into the next command, i.e. egrep which selects the lines for the relevant program. (Fore some reason the module command happens to write its listings in stderr which appears on the terminal screen and does not go to the pipeline.)

As for the normal user, the Module system is more or less rigid, i.e. users may not create their own module scripts for their needs. If you think that you have created a program that has wider use, you may contact the administrators and request them to provide yet another module script which enable other people to use your program.

If the module command does not work

If you e.g. run a shell inside Emacs, you may not be able to use the module system. Instead, the system gives an error message: module: command not found. This is not a feature of the module system but just a shortcoming in its installation on Hippu. One may still use the module system by issuing the following command:

eval `/opt/Modules/$MODULE_VERSION/bin/modulecmd bash list`

Of course, you should replace the list command with e.g. load R or whatever module or command you need. The above command works on the BASH shell. On other shells, you probably need a slightly different form of the command. (Linguistic users should use the BASH shell, if they happen to have e.g. the TCSH shell, they should ask the administrator to change their shell to BASH.)

-- KimmoKoskenniemi - 2011-02-08

Topic revision: r2 - 2012-02-09 - KimmoKoskenniemi
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback