Actions

Difference between revisions of "Modules"

From Montana Tech High Performance Computing

(Current Modules on HPC)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
The Modules package provides for the dynamic modification of a user's environment without modifying the .bashrc or .profile files. The user simply loads the needed packages and the module command aloters or sets shell environment variables like the PATH variable.
+
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===
 
===Example Commands===
: <code>module avail</code> ->lists available modules on the system
 
: <code>module listing</code> ->lists the modules a user currently has loaded
 
: <code>module load namd</code> ->load the NAMD package
 
: <code>man module</code> ->complete documentation on module
 
  
===Current Modules on HPC===
+
Some common module commands include:
: blast
+
 
: cuda/8.0
+
: <code>module list</code> - display currently loaded modules
: gcc/5.4.0   gcc/6.3.0
+
: <code>module avail</code> - show a list of available modules
: hmmer
+
: <code>module load <module_name></code> - load a specific module
: lammps/20161117
+
: <code>module unload <module_name></code> - unload a specific module
: mpich/gnu/3.2
+
: <code>module help <module_name></code> - access detailed information on a specific module
: mpich2/gnu/1.5
+
 
: mvapich2/gnu/2.2
+
===Module Types===
: openmpi/gnu/2.0
+
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 <code>module avail</code> command, and you'll see a list of available modules grouped into three sections:
: namd
+
: <code style=display:block>
: python/2.6.5
+
---------------------------------------------- /opt/ohpc/pub/moduledeps/gnu12-openmpi4 ----------------------------------------------
: R/3.3.3
+
  boost/1.80.0    extrae/3.8.3    omb/6.1        scorep/7.1      tau/2.31.1
: vmd
+
  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)</code>
 +
 
 +
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 <code>module swap</code>command, for example:
 +
* <code>module swap openmpi4 mpich</code> - switch from OPENMPI to the default mpich build (compiler won't change)
 +
If issuing the above command after logging on, you'll see the output from <code>module avail</code> command changed to:
 +
: <code style=display:block>
 +
----------------------------------------------- /opt/ohpc/pub/moduledeps/gnu12-mpich ------------------------------------------------
 +
  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 (L,D)    openmpi4/4.1.4
 +
----------------------------------------------------- /opt/ohpc/pub/modulefiles -----------------------------------------------------
 +
  EasyBuild/4.6.2        cmake/3.24.2        hwloc/2.7.0        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    papi/6.0.0        ucx/1.11.2        (L)</code>
 +
 
 +
* <code>module swap gnu12 intel</code> - switch from GNU12 to Intel compilers/MPI
 +
Similarly, after issuing the above command , you'll see the output from <code>module avail</code> command changed to:
 +
:<code style=display:block>
 +
-------------------------------------------------- /opt/ohpc/pub/moduledeps/oneapi --------------------------------------------------
 +
  compiler-rt/2023.1.0  (L)    compiler32/2023.1.0      icc/2023.1.0            mkl/2023.1.0  (L)    oclfpga/2023.1.0 (L)
 +
  compiler-rt32/2023.1.0        debugger/2023.1.0        icc32/2023.1.0          mkl32/2023.1.0        tbb/2021.9.0    (L)
 +
  compiler/2023.1.0      (L)    dev-utilities/2021.9.0    init_opencl/2023.1.0    mpi/2021.9.0
 +
 
 +
-------------------------------------------------- /opt/ohpc/pub/moduledeps/intel ---------------------------------------------------
 +
  impi/2021.9.0
  
====Admin Note====
+
----------------------------------------------------- /opt/ohpc/pub/modulefiles -----------------------------------------------------
Module files are located in /opt/scyld/modulefiles
+
  EasyBuild/4.6.2        cmake/3.24.2    hwloc/2.7.0            ohpc      (L)    prun/2.2          (L)    valgrind/3.19.0
 +
  MATLAB/R2022b          gnu12/12.2.0    intel/2023.1.0  (L)    os                singularity/3.7.1
 +
  autotools      (L)    gnu9/9.4.0      libfabric/1.13.0        papi/6.0.0        ucx/1.11.2        (L)</code>

Latest revision as of 11:57, 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 swapcommand, for example:

  • module swap openmpi4 mpich - switch from OPENMPI to the default mpich build (compiler won't change)

If issuing the above command after logging on, you'll see the output from module avail command changed to:


/opt/ohpc/pub/moduledeps/gnu12-mpich ------------------------------------------------
  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 (L,D)    openmpi4/4.1.4

/opt/ohpc/pub/modulefiles -----------------------------------------------------
  EasyBuild/4.6.2        cmake/3.24.2        hwloc/2.7.0         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    papi/6.0.0        ucx/1.11.2        (L)
  • module swap gnu12 intel - switch from GNU12 to Intel compilers/MPI

Similarly, after issuing the above command , you'll see the output from module avail command changed to:


/opt/ohpc/pub/moduledeps/oneapi --------------------------------------------------
  compiler-rt/2023.1.0   (L)    compiler32/2023.1.0       icc/2023.1.0            mkl/2023.1.0   (L)    oclfpga/2023.1.0 (L)
  compiler-rt32/2023.1.0        debugger/2023.1.0         icc32/2023.1.0          mkl32/2023.1.0        tbb/2021.9.0     (L)
  compiler/2023.1.0      (L)    dev-utilities/2021.9.0    init_opencl/2023.1.0    mpi/2021.9.0

/opt/ohpc/pub/moduledeps/intel ---------------------------------------------------
  impi/2021.9.0

/opt/ohpc/pub/modulefiles -----------------------------------------------------
  EasyBuild/4.6.2        cmake/3.24.2    hwloc/2.7.0             ohpc       (L)    prun/2.2          (L)    valgrind/3.19.0
  MATLAB/R2022b          gnu12/12.2.0    intel/2023.1.0   (L)    os                singularity/3.7.1
  autotools       (L)    gnu9/9.4.0      libfabric/1.13.0        papi/6.0.0        ucx/1.11.2        (L)