Difference between revisions of "Quickstart/Using Modules"

From HPC
Jump to: navigation , search
(module purge: added extra links on modules)
m (What Modules are available?)
Line 70: Line 70:
 
To remove all loaded modules and return your environment to are vanilla state, run '''module purge'''. Running this command will not display anything and will just return you back to the Linux command prompt.
 
To remove all loaded modules and return your environment to are vanilla state, run '''module purge'''. Running this command will not display anything and will just return you back to the Linux command prompt.
  
==What Modules are available?==
+
==What modules are available?==
 
[[Modules| Modules Available]]
 
[[Modules| Modules Available]]
  

Revision as of 15:56, 8 November 2022

What are modules?

Viper uses a module environment to provide access to applications, tools and libraries. Modules allow us to provide multiple versions of applications and libraries without causing conflicts. By loading a module, your environment is configured to allow you to use your chosen application by setting required paths and environment variables. Modules can be loaded and unloaded dynamically, giving you full control over your working environment.

The following commands allow you to find out what modules are available on Viper, find out more information about them and control which modules you load.

Loading a module will be active for that session only.

module avail

To see a full list of applications and libraries that are available to use on Viper, you should run module avail as shown below (showing only a few of the hundreds of modules that are available):

[username@login01 ~]$ module avail

--------------------------------------------- /usr/share/Modules/modulefiles ---------------------------------------------------------------------------------------
dot         module-git  module-info modules     null        use.own

--------------------------------------------- /trinity/clustervision/CentOS/7/modulefiles/apps ------------------------------------------------------------------------------
abyss/1.5.2/gcc-5.2.0                   centrifuge/1.0.4                        hyphy/2.2.7/gcc-6.3.0/openmpi-2.0.2     orca/4.0.0                              STAR/2.6.1
albacore/1.2.6                          cp2k/3.0                                hypre/intel/2.10.0b                     orca/4.0.1                              starccm+/11.02.010
ansys/v170                              cp2k/6.1.0/gcc-7.3.0/intelmpi-2018      idl/8.4                                 orca/4.1.0/openmpi212                   starccm+/12.04.011
ansys/v172                              cp2k/6.1.0/gcc-7.3.0/openmpi-3.0.0      image-magic/7.0.7/mpich-3.2/gcc-5.2.0   orca/4.1.0/openmpi313                   starccm+/12.06.011


If you want to use a specific application, you can find which versions are available by running module avail modulename, e.g.:

[username@login01 ~]$ module avail gcc

-------------------------------------------- /trinity/clustervision/CentOS/7/modulefiles/development ---------------------------------------------------------------------------
gcc/4.9.3(default) gcc/5.2.0          gcc/6.3.0          gcc/7.3.0          gcc/8.2.0

In this case, the (default) indicates that gcc/4.9.3 is the default GCC module.

module add

To add a module you use module add modulename. In most cases, running this command will not display anything and will just return you back to the Linux command prompt.

[username@login01 ~]$ module add gcc

If you want to add a specific version of a module then you should include the version number, for example:

[username@login01 ~]$ module add gcc/8.2.0

Without putting a version in, you will either load the highest alphanumeric version or the default if one is set.

Note: module load and module add are the same.

module list

To see what modules you have loaded, run module list

[username@login01 ~]$ module list
Currently Loaded Modulefiles:
  1) gcc/8.2.0

module delete

To remove a loaded module and all environment configurations that the module has set, run module delete modulename. Running this command will not display anything and will just return you back to the Linux command prompt.

Note: module delete, module unload, module del and module rm are the same.

module purge

To remove all loaded modules and return your environment to are vanilla state, run module purge. Running this command will not display anything and will just return you back to the Linux command prompt.

What modules are available?

Modules Available

Modules requiring special licenses

Test Modules


Back / Next (Interactive Sessions)