Since 10 November our faculty has a new website! The old website will still be available at oldwww.fi.muni.cz for now. Something is broken? Please report it to webmaster@fi.muni.cz or use our webform.

translated by Google

The system of modules is installed on the UN * X machines in the fi.muni.cz domain. This makes it easier to use the installed software. It unifies access to programs on different platforms.

How to use them?

First, the modules must be initialized. This is done in system files / etc / profile, or (for X window) * [xX] session. The list of available modules can then be listed with the command

$ module avail
The output will look like this:
--------- /packages/run/modules-2.0/modulefiles ---------
binhex         gnuplot        modules        tcl-tk
devel          info-services  plan           texlive
eclipse        maple          snns           viewers
Then you need to connect the necessary modules with the command:
$ module add 
jméno
The list of currently connected modules is obtained
$ module list
Currently Loaded Modulefiles:
          1) modules
Here's a quick idea of ​​how to get a specific module
$ module help 
jméno
Module modules must always be connected. If it is not, we will do it with a command
$ module add modules
Similarly, we add others,
module add texlive
Module is a summary of software that logically belongs to each other. By joining the module, we will make these programs available. For example, after the last command, we have not only our own TeX, but also the .dvi file (xdvi), dvips, man pages, and more.

How is this done?

Command

$ module add 
jméno
a change occurs in shell environment variable settings, typically variables PATH , MANPATH and XUSERFILESEARCHPATH . The custom command module is implemented as a shell function, but it has the property that it does not. It is therefore appropriate to initialize it to ~/.kshrc or another file that is executed when the shell is started. For example, default /etc/kshrc contains a line
. /packages/run/modules-2.0/init/ksh
For more details, see also:
man module

How to write modules?

In addition, information is available to those interested in the system in more detail, or to those who want to install all the available software packages.

What's going on?

Modules serve to unify access to the installed SW on individual platforms, identify a single location for SW installation that is shared between different computers, and last but not least, allow multiple versions of one package to be installed at the same time.

How does it work?

Modules are available on all UN * X platforms in the directory /packages . Here are subdirectories run ( run64 ), share and share_rw . In these directories, individual packages are installed into directories jméno_balíku-verze , for example gcc-3.4.1 .

Address book run contains add-ons on the platform, usually what's in the directories bin whose lib . That's why it is run shared between similar machines - for example, all Linux on i386, all Solaris, all MacOS X.

Address book share is designed for platform-independent data and programs. Analogy is with data in /etc (configuration files), man and info . There should also be programs written eg in pearl, seduce or python. This directory is shared between all platforms.

Address book share_rw is the only one available for enrollment. Therefore, there should be those parts of the installation that must be accessed for writing during the job. For common programs, it is not needed, you can store data in either /tmp or in the home directory of the user who is dropping the program.

In the directory run/links and here in bin and lib there are lines on binaries in /packages/{run,share} , which should be available without explicitly adding the module that contains them (in fact, these directories are added after entering module add modules ). This is usually the case for mail clients (elm, mutt, pine, ... or other useful tools (gtar, gzip, ...). run/modules-2.0 everything is needed to initialize and run modules. Here in init are files for initialization in individual shells. Initialization usually takes place in profile or xsession (even in global) for example by calling:

. /packages/run/modules-2.0/init/bash
and then a command is available in the shell module . Its description is in the user section of this page.

Next in the directory modulefiles is the actual description of the module (which is performed at module add jméno ) and in the directory helpfiles is a brief help on each package.

How to start a new module

First, you need to create directories /packages/run/balík-verze (preferably on all platforms) and /packages/share/balík-verze . For this purpose it serves application for module creation . Then, compile the package that is set up so that it is --prefix (ie where it is installed) is set /packages/share/balík-verze and --bin-prefix and --lib-prefix (ie, binaries and libraries) are set to /packages/run/balík-verze . Installation is then performed in these directories. The package should be installed on all FI platforms (ie Linux x86, Linux x86-64, Solaris, and MacOS X).

File /packages/run/modules-2.0/modulefiles/balík-verze is filled with the required configuration and file /packages/run/modules-2.0/helpfiles/balík-verze a brief text about the content and use of this package is placed.

Now the package should be visible in module avail and accessible after entering module add balík-verze .

In the directory /packages/run/modules-2.0/modulefiles each package should also have a version label. The only exception is the so-called default version , which is created using a symbolic link to an existing file balík-verze . It is then available by simply typing module add balík .

File syntax in modulefiles

For details, see module(1) and modulefile(4) . The following is briefly followed:

#%Module1.0
#!
#! Title:
#! Platforms: sun4
#! Version:
#! Description:
#!
#!
#!
proc ModulesHelp {} {
global ModulesCurrentModulefile
puts stdout "modulehelp $ModulesCurrentModulefile"
}
This should look like the beginning of the file, with the Title = package name, Platforms = for which platforms are specified (typically only one), Version and Description = version and description. Following may:
append-path JMÉNO HODNOTA
prepend-path JMÉNO HODNOTA
adds HODNOTA to the beginning or end of the variable JMÉNO . E.g.:
append-path PATH /packages/run/gcc-3.4.1/bin
append-path LD_LIBRARY_PATH /packages/run/gcc-3.4.1/lib
setenv JMÉNO HODNOTA
unsetenv JMÉNO
Set the NAME variable to VALUE. Deletes the contents of the variable.
conflict MODUL [MODUL ...]
Which modules are in conflict.
prereq MODUL [MODUL ...]
Which modules are needed.
module PŘÍKAZ [ARG]
the same commands as a command module and others that are described in the man page.

Which machines can be installed?

Because /packages are read-only on most machines, you must write here on selected machines. They are:

How do I get the rights to write to /packages

If you choose to install a program for all, you need to create the necessary directories and files application modules for creating modules at the Faculty Administration. You must specify the package name, version, and for which OS you intend to install. When setting up a new module, please follow the above instructions . You will simplify and make the situation easier not only for us but also for many students who choose to use your package. You also need to take care of installed package licenses . Certainly, programs that are not licensed should not be installed here.

Likewise, if you want to take over a package from your predecessor, you can, if necessary, ask unix@fi about the appropriation of an existing package to you.

And now?

Now just choose which software you want to install and hurry into it! If you want to upgrade an existing module, please first contact whoever manages the lower version package - you will find it by the owner of the appropriate directory.