Modules are a utility which allow users to load and manage applications and their versions. The modules of software packages allow you to dynamically modify your user environment by using “modulefiles.”
Each modulefile contains the information needed to configure the shell for an application. After the module software package is initialized, the environment can be modified on a per-module basis using the module command, which interprets modulefiles. Typically, modulefiles instruct the module command to change or set shell environment variables such as
MANPATH, and others. The modulefiles can be shared by many users on a system.
📝 Note: Some modules cannot be used simultaneously, such as an Intel compiler and a GNU compiler (information on compilers). If you attempt to load a module that is incompatible with a currently-loaded module, you will be prompted of the conflict. To avoid the error, you may have to unload or switch modules.
Summary of Module Commands
||Lists modules currently loaded in a user's environment.
A module is considered loaded when its associated modulefile has been executed
and the user's environment contains the changes from the modulefile.
||Lists all available modules on a system.|
||Shows environment changes that will be made by loading a given module.|
||Loads a module.|
||Unloads a module.|
||Shows help for a module.|
||Swaps a currently loaded module for an unloaded module.|
To see a list of all available modules, type
📝 Note: If you need a module that is not available, please contact us.
You can check for the existence of a module and its versions using
module avail <module-name>.
$ module avail cuda ----------------- /software/dev_tools/swtree/cs400/modulefiles ----------------- cuda/6.5 cuda/7.5(default) cuda/8.0
Working with Modules
When you load a module, your environment is modified to use a specific software package. To load a module (replace
module_name with the name of the module you would like to load):
module load module_name
To verify your module has loaded, you can type
To display information about the attributes of the module such as the size of the module, the compiler or the source from which the module was created, etc., use the following command:
module display your_module
Removing and Switching Modules
Unloading a module will avoid conflict and/or messages of failure due to different versions or dependencies.
module unload PE-gnu/1.0
Switching between different module versions can accomplish the task of having to load, unload and load modules in multiple steps. In the following example,
cuda/7.5 is currently loaded. After running the command,
cuda/7.5 is unloaded and
cuda/8.0 is loaded.
module switch cuda/7.5 cuda/8.0
You can unload all the modules on your environment, by executing the module purge command:
The CVMFS repo contains software distributed and maintained by the Open Science Grid. Full documentation for the CernVM-File System (CVMFS) is available here. The following command will provide the user access to the CVMFS module repository.
source /software/dev_tools/swtree/cs400/modulefiles/switch-modules.sh switch_modules oasis
After entering the above commands the new repository is active and the command below will list the software available for use:
switch_modules local will bring back the local modules to use.