translated by Google

Machine-translated page for increased accessibility for English questioners.

A system of modules is installed on Unix machines in the 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 the / etc / profile system files, or (for the X window) * [xX] session. Then the list of available modules can be listed by the command

$ module avail
--------- /packages/run/modules-2.0/modulefiles ---------
binhex         gnuplot        modules        tcl-tk
devel          info-services  plan           texlive
eclipse        maple          snns           viewers
Then it is necessary to connect the necessary modules with the command:
$ module add 
We get a list of currently connected modules
$ module list
Currently Loaded Modulefiles:
          1) modules
We will get a brief help about what a specific module is about
$ module help 
Module modules must always be connected. If not, we will do it with a command
$ module add modules
Similarly, we will add others, e.g.
$ module add texlive
A module is a collection of software that logically belongs together. By connecting the module, we will make these programs available. For example, after the last command, we have not only our own TeX, but also a browser for .dvi files (xdvi), a converter (dvips), manual pages, and more.

How is it done?

By order

$ module add 
there is a change in the setting of shell environment variables, typically variables PATH , MANPATH and XUSERFILESEARCHPATH . The module command itself is implemented as a shell function, but it has the property that it is not inherited. Therefore, it is advisable to put its initialization in ~/.kshrc or another file that is executed when the shell starts. For example, default /etc/kshrc contains a line
. /packages/run/modules-2.0/init/ksh
See also:
$ man module

How to write modules?

There is also information available for those who are interested in the system in more detail, or for those who want to install an all-available software package.

What's going on?

The modules are used to unify access to the installed SW on individual platforms, determine a single place for SW installation, which is shared between different computers and, last but not least, gives the possibility to have multiple versions of one program package installed at the same time.

How does it work?

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

Address book run it contains platform-dependent things, usually what is in directories bin whose lib . That's why it is run shared between similar machines.

Address book share is designed for platform-independent data and programs. The analogy is with the data in /etc (configuration files), man and info . There should also be programs written in pearl, sed or python, for example. This directory is shared across all platforms.

Address book share_rw is the only one available for writing. Therefore, it should contain those parts of the installation that must be accessed for writing even during work. It is not necessary for common programs, they store their data either in /tmp or in the home directory of the user running the program.

In the directory run/links and here in bin and lib there are lines to 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 ). For example, mail clients (elm, mutt, pine, ... or other useful tools (gtar, gzip, ...) are usually put here. Placing links here should be done with caution. run/modules-2.0 everything is needed for initialization and operation of modules. Here in init are files for initialization in individual shells. Initialization usually takes place in profile or xsession (even in global ones) 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 part of this page.

Further in the directory modulefiles is a custom description of the module (which is done when module add jméno ) and in the directory helpfiles is a brief help for each package.

How to proceed when creating a new module

First you need to create a directory /packages/run/balík-verze (preferably on all platforms) and /packages/share/balík-verze . It is used for this purpose module creation application . The package is then compiled, which is set to --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 . Then the installation is performed in these directories. The package should ideally be installed on all available FI platforms (ie Linux x86 and Linux x86-64).

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

The package should now 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 designation. 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 entering it module add balík .

File syntax in modulefiles

See details module(1) and modulefile(4) . It also briefly follows here:

#! Title:
#! Platforms: sun4
#! Version:
#! Description:
proc ModulesHelp {} {
global ModulesCurrentModulefile
puts stdout "modulehelp $ModulesCurrentModulefile"
This should look like the beginning of the file, with Title = package name, Platforms = for which platforms it is intended (typically only one), Version and Description = version and description correctly. This may be followed by:
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
unsetenv JMÉNO
Sets the NAME variable to VALUE. Deletes the contents of a variable.
conflict MODUL [MODUL ...]
Which modules it conflicts with.
prereq MODUL [MODUL ...]
Which modules does it need.
module PŘÍKAZ [ARG]
the same commands as the command module and others, which are described in the man page.

On which machines can it be installed?

Because /packages are read-only on most machines, it is necessary to write here on selected machines. They are:

  • anxur, aisa, aura and nymfe01

How do I get write access to /packages

If you decide to install the program for all, you will create the necessary directories and files module creation applications at the Faculty Administration. You must enter the package name, version and OS for which you intend to install it. Please follow the instructions above when installing a new module. You will simplify and make the situation more pleasant not only for us, but also for many students who decide to use your package. You also need to pay attention to the licenses of the installed packages. Certainly, those programs whose license does not allow this should not be installed here.

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

And now?

Now just choose what software you want to install and go for it! If you want to upgrade an existing module, please contact first who manages a package with a lower version - you can find it by the owner of the relevant directory.