Modules Basic Usage¶
The minimal information required for using a standalone application at UFRC:
module
will output help information on running the module command. The module help includes all information described below. You can also view the User Guide to Lmod for the upstream documentation.
Loading a moduleIf you already know the name of the module, the only command needed to load the latest or the default version of the module and be able to execute the software is 'module load
|
Unloading a moduleAll modules are automatically unloaded when you log out of the HPC system, and in most cases, there is no need to use the unload command.
|
Showing information about modules¶
|
|
|
Finding a module¶
When you need to find out whether a program is already installed user either 'module spider' to search through the module names or 'module keyword' to search through module description, tags, and keywords.
E.g. this command will find pbsmrtpipe, smrtsv2, and also the pacbio (smrtlink tools) module, which module spider will not find.
module keyword smrt
A much more concise, but context specific table of available modules can be obtained with
module avail
The "module avail" command shows all currently accessible branches of the global tree of modules, which depend on what compiler and MPI implementation modules are loaded. The core branch is always shown, but we also have various version branches for compiler and mpi, implementation specific, and even python. The top line at each section shown by 'module avail' shows exactly what loaded module is responsible for enabling that branch of the module tree. Sometimes, to load a module that you find using "module spider" you might have to go through the sequential steps of loading the respective branches. E.g., if you need to load the module for the "espresso" software that was built with MVAPICH2 support using Intel Compiler version 11.1 you would run
module load intel/11.1 mvapich2 expresso
Swapping branches¶
To switch between different compiler and MPI implementation of a particular app or to gain access to a module that belongs to a particular branch run the following command to swap the old for the new branch
module swap old new
module swap old/version new/version #this is if you loaded a specific version
If multiple versions of a particular app/version are available module will automatically reload those modules when you swap the branches, so you could seamlessly switch between a single-threaded version of an app you used for testing and an mpi version that will be used for a large-scale computing job.
Managing Module Collections¶
A very useful feature of Lmod is to save and restore custom collections
of modules with module save
and module restore
as described in the
user
collections
section of the User Guide. See the contents of a collection with module
describe
and show a list of your collections with module savelist
.