modules
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
modules [2022/03/07 13:57] – nico | modules [2022/03/23 11:47] (current) – nico | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Environment Modules ====== | ||
+ | |||
Environment modules are used to define environment variables for applications available on Magi. Formerly, we used **lmod**. We moved to **environment modules** in the current version of Magi. All modules are stored in / | Environment modules are used to define environment variables for applications available on Magi. Formerly, we used **lmod**. We moved to **environment modules** in the current version of Magi. All modules are stored in / | ||
Line 8: | Line 10: | ||
The **compiled** subdirectory reflects the way the software has been built. For instance, we have OpenMPI module located in gcc/ | The **compiled** subdirectory reflects the way the software has been built. For instance, we have OpenMPI module located in gcc/ | ||
+ | |||
+ | To enable a module, for example OpenMPI, you use the **module** command with **load** : | ||
+ | |||
+ | | ||
+ | |||
+ | To list loaded modules : | ||
+ | |||
+ | | ||
+ | | ||
+ | 1) / | ||
+ | |||
+ | To see all available modules : | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | ... | ||
+ | |||
+ | And to unload a module : | ||
+ | |||
+ | | ||
+ | |||
+ | The module is unloaded : | ||
+ | |||
+ | | ||
+ | | ||
+ | 1) / | ||
+ | |||
+ | ====== Upgrade from lmod to environment modules ====== | ||
+ | |||
+ | You should modify your .bashrc to switch from **lmod** to **environement modules**. The .bashrc is located at the root of your home directory. For example, my .bashrc is in / | ||
+ | |||
+ | if [ -z " | ||
+ | export BASHRC_READ=1 | ||
+ | module use / | ||
+ | module use / | ||
+ | module use / | ||
+ | # | ||
+ | fi | ||
+ | |||
+ | You should replace this section with this one below : | ||
+ | |||
+ | if [ -f / | ||
+ | then | ||
+ | source / | ||
+ | export MODULEPATH=/ | ||
+ | # Enable some modules here | ||
+ | module load / | ||
+ | fi | ||
+ | |||
+ | Then, you disconnect and reconnect to Magi and you should use **environment modules**. |
modules.1646657874.txt.gz · Last modified: 2022/03/07 13:57 by nico