Difference between revisions of "Modules"
From Montana Tech High Performance Computing
(→Swapping Compilers / MPI) |
|||
Line 35: | Line 35: | ||
To change to a different compiler / MPI toolchain, utilize the <code>module swap</code>command, for example: | To change to a different compiler / MPI toolchain, utilize the <code>module swap</code>command, for example: | ||
: <code>module swap openmpi4 mpich</code> - switch from OPENMPI to the default mpich build | : <code>module swap openmpi4 mpich</code> - switch from OPENMPI to the default mpich build | ||
− | : <code>module swap gnu12 intel</code> - switch from GNU12 to Intel compilers | + | : <code>module swap gnu12 intel</code> - switch from GNU12 to Intel compilers/MPI |
Revision as of 10:50, 18 April 2023
Our HPC system also offers a variety of development tools and libraries to facilitate efficient and effective programming. These resources are designed to work seamlessly with the available compilers.
To take full advantage of these tools and libraries, it is essential to familiarize yourself with the module command. This command allows you to manage the development environment effectively by loading, unloading, and swapping modules as needed.
Example Commands
Some common module commands include:
-
module list
- display currently loaded modules -
module avail
- show a list of available modules -
module load <module_name>
- load a specific module -
module unload <module_name>
- unload a specific module -
module help <module_name>
- access detailed information on a specific module
Module Types
Two types of modules are installed: modules with compiler and/or MPI runtime dependencies, and modules without such dependencies. When you log on to the HPC, issue the module avail
command, and you'll see a list of available modules grouped into three sections:
/opt/ohpc/pub/moduledeps/gnu12-openmpi4 ----------------------------------------------
boost/1.80.0 extrae/3.8.3 omb/6.1 scorep/7.1 tau/2.31.1 dimemas/5.4.2 imb/2021.3 scalasca/2.5 sionlib/1.7.7
/opt/ohpc/pub/moduledeps/gnu12 ---------------------------------------------------
impi/2021.9.0 mpich/3.4.3-ofi mvapich2/2.3.7 pdtoolkit/3.25.1 likwid/5.2.2 mpich/3.4.3-ucx (D) openmpi4/4.1.4 (L)
/opt/ohpc/pub/modulefiles -----------------------------------------------------
EasyBuild/4.6.2 cmake/3.24.2 hwloc/2.7.0 (L) ohpc (L) prun/2.2 (L) valgrind/3.19.0 MATLAB/R2022b gnu12/12.2.0 (L) intel/2023.1.0 os singularity/3.7.1 autotools (L) gnu9/9.4.0 libfabric/1.13.0 (L) papi/6.0.0 ucx/1.11.2 (L)
In this example, the modules in the first section depend on the GNU12 + OPENMPI4 toolchain. The second section's modules are dependent on GNU12 only. The modules listed in the third section have no compiler or MPI dependencies. When selecting modules, ensure that you choose the appropriate ones based on your compiler and MPI runtime dependencies. Keep in mind that some libraries and tools may have unique dependencies or configurations that need to be considered when setting up your environment.
Swapping Compilers / MPI
To change to a different compiler / MPI toolchain, utilize the module swap
command, for example:
-
module swap openmpi4 mpich
- switch from OPENMPI to the default mpich build -
module swap gnu12 intel
- switch from GNU12 to Intel compilers/MPI