Skip to content

Environment modules

Most software installed on the eRN must be loaded before use. All commands in this guide are to be run at the [eRN]$ prompt, unless otherwise stated. The eRN makes use of Environment Modules version 5.4.0,

A list of available software, including all versions, can be viewed by running module avail. It is possible to view only the available versions of a specific software. As an example the available versions of rstudio is reproduced as displayed by module avail rstudio.

1
2
3
------------ /home/***********/ern/environments/deploy/modules ------------
rstudio/1.0_a06b712  rstudio/2.1_30cc4fc  rstudio/2.3_e46f347
rstudio/2.0_1a9bb08  rstudio/2.2_49df63e

The versions shown are the installation`s version, not the version of any of the installed software. The documentation for rstudio reveals that for version 2.3_e46f347 the version of Rstudio is 2023.06.2+561 and for R it is 4.4.0. Versioning of the installation is motivated firstly, by the fact that an old install should remain unaltered once used by end users to facilitate reproducibility. And, secondly, often the installation is a collection of software. Already mentioned the rstudio bundle contains both R and Rstudio, with different release cycles, an installation may update either, neither or both.

The module can be loaded by running module load rstudio. If a specific version of the bundle is required, for example version 2.3_e46f347 of rstudio simply append the version as shown module load rstudio/2.3_e46f347

The status of the loaded module can be shown by running module list rstudio:

Currently Loaded Matching Modulefiles:
1) rstudio/2.3_e46f347{release=9}

By omitting the software's name, thus running module list, all currently loaded modules can be displayed.

1
2
3
Currently Loaded Modulefiles:
1) erndevel/1.0_4c217c2{envmodules=5.4.0:os=rocky}
2) rstudio/2.3_e46f347{release=9}

Running the command module unload rstudio unloads the module. This is useful to unload software that conflicts with some other software you wish to load. For example:

1
2
3
4
5
$ module load bowtie
$ module load metaphlan
Loading metaphlan/1.1_24c9481
  ERROR: Module cannot be loaded due to a conflict.
      HINT: Might try "module unload bowtie/1.0_434c484" first.

All loaded modules that can be safely unloaded automatically, in other words modules that are not sticky, are unloaded when the exits. If there are any sticky modules, such as service, mesh, or cluster modules, a prompt is shown, press Enter to unload the modules.