Environment Modules

Note

This documentation is a work in progress. Any comment or suggestion is welcome in sinfin@iac.es.

To stay informed about updates to "Environment Modules", tips, etc., or to ask any questions regarding its use, please use the #computing/astrosoft@iac channel in IAC-zulip.

The SIE maintains a large list of software (compilers, astronomical software, python modules,etc.), available in Linux laptops and Burros via CernIE. To easily handle them and avoid conflicts, they are organized using environment modules.

The main idea is that each module modifies the current search paths (e.g., the PATH environment variable) such that an application can be made visible to the user in a controlled way.

Attention

To get all SIE installed applications working correctly with the environment modules as described here you need to "source" a script that we provide. While there are several ways in which you could do this, we recommend that you include the following line at the end of your .bashrc and .bash_profile (or .profile) files in your home directory: source /opt/SIE/local/glob/.bashrc_SIE

Loading modules

To see all the available modules in a system, run

[user@machine:~]$: module avail
------------- /usr/share/modules/modulefiles -------------
dot  module-git  module-info  modules  null  use.own

--------- /usr/local/share/modulefiles/compilers ---------
cudnn/11.4               nvhpc-nompi/21.5  nvhpc/22.5
gcc/10.1.0               nvhpc-nompi/21.9
intel/2020_update4       nvhpc-nompi/22.2
                  [ . . . . . ]

If you are specifically looking for some application, e.g., Python:

[user@machine:~]$: module avail python
--------- /usr/local/share/modulefiles/tools -------------
python/2.7  python/3.6  python/3.8

Note

We try to provide applications used extensively by researchers, but if you feel that we have missed something important for your research, let us know: cau@iac.es.

To load one of the versions

[user@machine:~]$: module load python/3.8
Environment for PYTHON 3.8 loaded
Use commands python3 or python3.8 to start Python 3.8
[user@machine:~]$: python3 --version
Python 3.8.13

Tip

You can get more advance information about each module (e.g., which path it changes) using module show.

It may happen that loading a module causes a conflict. In that case, they can not be loaded simultaneously:

[user@machine:~]$: module load python/2.7
Loading python/2.7
  ERROR: Module cannot be loaded due to a conflict.
    HINT: Might try "module unload python" first.

As the error message has correctly suggested, a module can be unloaded using module unload. Then, the other version can be safely loaded.

Furthermore, if we wish to start from a "clean state", we can unload all the present modules with module purge.

Finally, to keep track of the currently loaded modules:

[user@machine:~]$: module list
Currently Loaded Modulefiles:
 1) python/3.8

Tip

If you are curious, you can look for the most used modules at the IAC here.