Lmod serves as a vital tool for effectively managing installations of various application software within our system. By employing the modules system, users are empowered to configure the shell environment, granting convenient access to applications and simplifying the process of executing and compiling software. In addition, Lmod facilitates the coexistence of multiple versions of the same software, thereby abstracting the complexities associated with versioning and the intricate dependencies on the operating system. This ensures a seamless and efficient software management environment within our system.
Upon logging into the cluster, users are presented with a default environment that offers limited software availability, serving as a basic and minimal foundation. To effectively manage and activate software packages as needed, the module system is employed. In order to utilize the software installed on the HKUST HPC4, it is imperative to load the corresponding software module first. By loading a module, the system automatically configures and adjusts the user environment variables accordingly, thereby granting access to the GPU-optimized software package associated with that specific module. For instance, the modification of the $PATH environment variable ensures the availability of necessary executables required by the respective software package. This systematic approach ensures seamless utilization of software resources within the cluster environment.
Module Usage
Here the list of usage of Lmod command:
Module command |
Description |
---|---|
module list |
List loaded modules in current environment |
module avail |
List available software |
module whatis lammps |
Display information about a particular module, say in this example, lammps |
module load lammps |
Load a particular module. |
module unload lammps |
Unload a particular module, |
module purge |
Remove all modules |
See below to check all available modules in HPC4. We install a minimal set of software for use on our systems and manage installations of the following types of programs:
- Compilation tools and common dependencies (e.g. MPI, different GCC versions)
- Software that requires a shared license (e.g. Matlab)
$ module avail --------------------------------------------- /opt/shared/spack/lmod/Core ---------------------------------------------- aocc/4.2.0-qpqu2gf gcc/12.3.0-5x7uqys mpich/4.2.1-begklur cmake/3.27.9-azi4m5i gcc/13.2.0-nefmpti (D) nvhpc/23.11-xiu2au7 cuda/11.8.0-nctwsal intel-oneapi-compilers/2023.2.4-57qdwc2 nvhpc/24.3-qpzgbwq (D) cuda/12.4.0-uhdfj7w (D) intel-oneapi-compilers/2024.1.0-imjimv2 (D) openblas/0.3.26-jpipmfm cudnn/8.9.7.29-12-ndz4fnc intel-oneapi-mkl/2024.0.0-d3piu27 openmpi/5.0.3-65bzfqx emacs/29.3-wufu3b6 intel-oneapi-mpi/2021.12.1-cecwr4h pmix/5.0.1-evqhfgt flexiblas/3.4.2-it7qvck llvm/17.0.6-keqsohx 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".
If you need to use a software not in the above group, you can use Spack for compiling or creating your private installation in environment module format. You could then do “module load” and run the software.
$ module load lammps $ module list Currently Loaded Modules: 1) glibc/2.34-xri56vc 3) intel-oneapi-mpi/2021.12.1-cecwr4h 5) lammps/20230802.3-sek3i2w 2) gcc-runtime/11.4.1-llid4hw 4) fftw/3.3.10-bsgli6i $ which lmp ~/.spack/local/linux-rocky9-x86_64_v4/gcc-11.4.1/lammps-20230802.3-sek3i2wpy73k4e6jqlns2tnrxspg2zyj/bin/lmp