Environment Modules
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 |
---|---|---|
cuda | 11.8 | 12.0, 11.7, 11.2 |
julia | 1.9 | 1.8, 1.7, 1.6, 1.5 |
matlab | 2022a | 2021a, 2020a |
stata | 18 | 17, 16 |
r | 4.3 | 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
Set Default Modules
You can save your current collection of modules as the default by the following command:
module save default
Create Custom Modules
You can create your own modules by following the following steps:
- Create a directory to contain your modules:
mkdir ~/modules
- Add this directory to the
MODULEPATH
environment variable:export MODULEPATH=${MODULEPATH}:${HOME}/modules
- 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/
.