User Tools

Site Tools


using_software_modules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
using_software_modules [2020/08/06 02:48]
taylors [Using Software Modules]
using_software_modules [2021/04/28 14:36] (current)
brandonm [Quick Start] Word, spelling, and formatting fixes
Line 3: Line 3:
 Many HPC systems support multiple libraries and library versions. For instance, by default, HPC Limulus systems support both Open MPI (Message Passing Interface) and MPICH. Each of these packages provides the MPI API for programmers and applications. These libraries are supplied as RPM packages as part of the [[https://openhpc.community/|OpenHPC distribution]]. Many HPC systems support multiple libraries and library versions. For instance, by default, HPC Limulus systems support both Open MPI (Message Passing Interface) and MPICH. Each of these packages provides the MPI API for programmers and applications. These libraries are supplied as RPM packages as part of the [[https://openhpc.community/|OpenHPC distribution]].
  
-To help manage multiple packages on a cluster, the  [[https://lmod.readthedocs.io/en/latest/|lmod package]] is a convenient way to dynamically change the users’ environment through //modulefiles//. This includes easily adding or removing directories to the PATH environment variable. Modulefiles for library packages provide environment variables that specify where the library and header files can be found.+To help manage multiple packages on a cluster, the  [[https://lmod.readthedocs.io/en/latest/|lmod package]] is a convenient way to dynamically change the users’ environment through //modulefiles//. This includes easily adding or removing directories to or from the PATH environment variable. Modulefiles for library packages provide environment variables that specify where the library and header files can be found.
  
 Thus, a user can quickly move between various library "environments" by simply using the lmod package.  Thus, a user can quickly move between various library "environments" by simply using the lmod package. 
Line 11: Line 11:
 ====Simple Example==== ====Simple Example====
  
-All Linux distributions come with GNU C compilers. While the versions of these compilers is "current" tehey are usually not "new" and may not support some advanced processors and offer better optimization. For instance, the current version of OpenHPC installs version 8.3 GNU compilers (C, C++, Fortran) in ''/opt/ohpc/pub/compiler/gcc/8.3.0/bin''. It does not replace the existing "distribution" compilers (version 4.8.5) located in ''/usr/bin''+All Linux distributions come with GNU C compilers. While the versions of these compilers are "current" they are usually not "new" and may not support some advanced processors or offer better optimization. For instance, the current version of OpenHPC installs version 8.3 GNU compilers (C, C++, Fortran) in ''/opt/ohpc/pub/compiler/gcc/8.3.0/bin''. It does not replace the existing "distribution" compilers (version 4.8.5) located in ''/usr/bin''.
  
-By default OpenHPC uses modules to point to the version 8.3 GNU compilers. This setting can be confirmed by entering:+By defaultOpenHPC uses modules to point to the version 8.3 GNU compilers. This setting can be confirmed by entering:
  
 <code> <code>
Line 23: Line 23:
  
 <code> <code>
-gcc --version+gcc --version
 gcc (GCC) 8.3.0 gcc (GCC) 8.3.0
 Copyright ... Copyright ...
Line 31: Line 31:
  
 <code> <code>
-$module rm gnu8+$ module rm gnu8
  
 Inactive Modules: Inactive Modules:
Line 37: Line 37:
 </code>  </code> 
  
-Ignoring the "Inactive Module" message for the moment, the path and version of the default GNU compilers can be shown as follows:+Ignoring the "Inactive Modules" message for the moment, the path and version of the default GNU compilers can be shown as follows:
  
 <code> <code>
Line 61: Line 61:
 ====Quick Start==== ====Quick Start====
  
-The following are some quick examples of hos the ''module'' command is used. +The following are some quick examples of how the ''module'' command is used. 
  
 ===What Modules are Available==== ===What Modules are Available====
  
 <code> <code>
-module avail+module avail
  
 ----------------------------------------------- /opt/ohpc/pub/moduledeps/gnu8 ----------------------------------------------- ----------------------------------------------- /opt/ohpc/pub/moduledeps/gnu8 -----------------------------------------------
Line 83: Line 83:
 ===Swap the MPI Libaries=== ===Swap the MPI Libaries===
  
-The folling example check the path to the current ''mpicc'' wrapper function and then swaps the MPI version from Open MPI to MPICH.+The following example checks the path to the current ''mpicc'' wrapper function and then swaps the MPI version from Open MPI to MPICH.
 <code> <code>
 $ which mpicc $ which mpicc
 /opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin/mpicc /opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin/mpicc
  
- module swap openmpi3 mpich/3.3.1+$ module swap openmpi3 mpich/3.3.1
  
 $ which mpicc $ which mpicc
 /opt/ohpc/pub/mpi/mpich-gnu8-ohpc/3.3.1/bin/mpicc /opt/ohpc/pub/mpi/mpich-gnu8-ohpc/3.3.1/bin/mpicc
 </code> </code>
using_software_modules.1596682087.txt.gz · Last modified: 2020/08/06 02:48 by taylors