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 the LaPalma supercomputer (see Available software in LaPalma) and also (via CernIE) in Linux laptops and Burros (see Software Supported by the SIE). To easily allow users to decide which software versions to use at a given moment we use 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
In Linux laptops and Burros, 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
============================== ASTRONOMICAL PACKAGES ===============================
......................... Reduction of Astronomical Data .........................
alfa/2.2 galfit/3.0.5 indexf/4.3 root/6.26.14
astrometry.net/0.94 galfitm/1.4.4 mesa/24.08.1 scamp/2.14.1
bbarolo/1.7 gildas/apr24a molly/1.1.8 sextractor/2.29.0
casa/6.6.3 gildas/sep25a molly/1.1.8_quiet skymaker/4.2.0
[ . . . . . ]
If you are specifically looking for some application, e.g., Python:
[user@machine:~]$ module avail python
.................................... General .....................................
python/3.10 python/3.12 python/3.12_b1125
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.
To load one of the versions
[user@machine:~]$ module load python/3.12
Environment for PYTHON 3.12 loaded
Use commands python3 or python3.12 to start Python 3.12
[user@machine:~]$ python3 --version
Python 3.12.3
Tip
You can get more advanced information about each module (e.g., how paths are
changed when loaded) 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/3.10
Loading python/3.10
ERROR: Module cannot be loaded due to a conflict.
HINT: Might try "module unload python/3.12" 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.12
Tip
If you are curious, you can look for the most used modules at the IAC here.