Environment modules is a tool that enables convenient modification of your environment. The most common use of this is to set the version of various software according to your need.

Available Modules

SCRP has the following prefined modules. Each module corresponds to a particular version of a software:

Module Default Version Other Versions
julia 1.7 1.6, 1.5
matlab 2021a 2020a
stata 17 16
r 4.1 4.2, mro-4.0, mro-3.5

This list can be obtained by typing in a terminal:

module avail

Load Modules

To load a module, type:

module load [module/version]

For example, to set MATLAB to version 2020a, you would type:

module load matlab/2020a

You can activate multiple modules as long as they do not conflict with each other. To see what modules are currently loaded, type:

module list

Unload Modules

Unload a module by typing:

module unload [module/version]

Unload all modules by typing:

module purge

Create Custom Modules

You can create your own modules by following the following steps:

  1. Create a directory to contain your modules:
    mkdir ~/modules
    
  2. Add this directory to the MODULEPATH environment variable:
    export MODULEPATH=${MODULEPATH}:${HOME}/modules
    
  3. Create module files inside the directory. There are many examples you can find online. You can also reference the predefined modules files located under /opt/network/module/modulefiles/.