Clipper uses Lmod to present software as modules to cluster users.
Modules allow software to be loaded/unloaded as necessary. Lmod manages dependencies between modules and can set/unset environment variables so that applications run in the correct environment.
This document describes basic Lmod usage.
Lmod usage
Listing Available Modules
Use the module avail
command to list available modules. This will display a list of all available modules.
[hpcuser1@clipper ~]$ module avail
------------------------------------------------- /opt/gvsu/clipper/2024.05/modulefiles/Core ----------------------------------------------------
apptainer/1.3.0 gdb/14.1 llvm/14.0.6 openblas/0.3.25 py-venv-ml/2024.05
awscli-v2/2.13.22 go/1.22.1 lua/5.4.6 openjdk/11.0.20.1_1 python/3.9.18 (D)
bonniepp/1.98 hdf5/1.14.3 miniconda3/24.1.2 openmpi/4.1.6 python/3.12.1
cuda/11.8.0 hwloc/2.10.0 ml-python/nightly pmix/4.2.9 r/4.3.2
cuda/12.3.0 (D) intel-oneapi-compilers/2024.1.0 mpich/4.2.1 pmix/5.0.2 (D) slurm/23-11-4-1
enroot/3.4.1 intel-oneapi-mkl/2024.0.0 mvapich2/2.3.7-1 py-cython/3.0.8 ucx/1.16.0
gcc/11.4.1 (D) intel-oneapi-mpi/2021.12.1 netperf/2.7.0 py-numba/0.58.1
gcc/12.3.0 iozone/3_506 nvhpc/24.3 py-pandas/2.1.4
gcc/13.2.0 julia/1.10.2 nvtop/3.0.1 py-scikit-learn/1.4.2
Where:
D: Default Module
If the avail list is too long consider trying:
"module --default avail" or "ml -d av" to just list the default modules.
"module overview" or "ml ov" to display the number of modules for each name.
Use "module spider" to find all possible modules and extensions.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
Loading Modules
Use the module load
command followed by the name of the module to load the module. For example, to load the GNU Compiler Collection (GCC) version 12.3.0 module, run the following command:
[hpcuser1@clipper ~]$ module load gcc/12.3.0
Lmod is a hierarchical module system. Core modules (the default list) are precompiled binaries or software compiled with the system compiler. Typically, Lmod would also group modules based on alternative compiler versions. However, all software on Clipper is currently compiled with the system compiler so the compiler hierarchy is empty.
Lmod’s final hierarchy is MPI, the behavior of which can be shown by loading OpenMPI:
[hpcuser1@clipper ~]$ module load openmpi
Loading an MPI module unlocks software compiled with support for that MPI implementation:
[hpcuser1@clipper ~]$ module avail
--------------------------------- /opt/gvsu/clipper/2024.05/modulefiles/openmpi/4.1.6-5zy4ujt/Core ----------------------------------
boost/1.84.0 hdf5/1.14.3 (D) osu-micro-benchmarks/7.3 py-torchstack/2024.05
fftw/3.3.10 intel-oneapi-mkl/2024.0.0 (D) py-mpi4py/3.1.5
Listing Loaded Modules
Use the module list
command to list loaded modules. This will display a list of all loaded modules.
[hpcuser1@clipper ~]$ module list
Currently Loaded Modules:
1) julia/1.10.2
Unloading Modules
Use the module unload
command followed by the name of the module to unload the module. For example, to unload the GCC version 12.3.0 module, run the following command:
[hpcuser1@clipper ~]$ module unload gcc/12.3.0
Purging All Loaded Modules
Use the module purge
command to unload all modules. This will completely reset your module environment. This can be a good practice to ensure any potential module conflicts are removed before setting up your environment.
[hpcuser1@clipper ~]$ module purge
Additional Resources
For more information on using Lmod, please refer to the official documentation: https://lmod.readthedocs.io/