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.
Lists modules currently located in user's environment
Lists all available modules on a system in condensed format
module avail -l
Lists all available modules on a system in long format
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
Modules: Local repository
By default the local repository is used as a source of software installations. To list available modules, type
module avail. To load a module, use
module load module_name. Similarly, unload modules by typing
module unload module_name.
To see a list of 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
When you load a module, your environment is modified to use a specific software package. To load a module:
module load vmd
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
Unloading a module will avoid conflict and/or messages of failure due to different versions or dependencies.
module unload your_module
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: