1. Software modules
HPC cluster systems typically have a large number of software packages installed. On GLiCID, we use the modules package to manage the user environment for the installed packages. Software modules simplify the utilization of pre-installed software packages and libraries by configuring the necessary environment variables. This makes it simple to use different packages or switch between versions of the same package without conflicts.
1.1. To see all available modules, run:
$ module avail ------------------------------------------------------------------------ /usr/share/Modules/modulefiles/applications ------------------------------------------------------------------------- castem/2021 castem/2023 gaussian/g16-revA01 hyperworks/2022.2 lammps/15Jun2023 openfoam/11-openmpi orca/5.3 turbomole/7.3 turbomole/7.5 turbomole/7.41 -------------------------------------------------------------------------- /usr/share/Modules/modulefiles/libraries -------------------------------------------------------------------------- aocl-blis/4.0 fftw/omp/3.3.10_intel_omp intel/dnnl-cpu-gomp/latest intel/intel_ipp_ia32/2021.8.0 intel/mkl/latest netcdf/f-4.6.1_gnu boost/1.82.0_gnu gmsh/4.11.1_gnu intel/dnnl-cpu-iomp/2023.1.0 intel/intel_ipp_ia32/latest intel/mkl32/2023.1.0 pnetcdf/1.12.3_gnu cuda/12.2.0_535.54.03 hdf5/1.14.1-2_gnu intel/dnnl-cpu-iomp/latest intel/intel_ipp_intel64/2021.8.0 intel/mkl32/latest pnetcdf/1.12.3_itl fftw/3.3.10_gnu_serial hdf5/1.14.1-2_gnu_openmpi intel/dnnl-cpu-tbb/2023.1.0 intel/intel_ipp_intel64/latest intel/tbb/2021.9.0 rdma/46.0_gnu fftw/3.3.10_intel_serial hdf5/1.14.1-2_intel intel/dnnl-cpu-tbb/latest intel/intel_ippcp_ia32/2021.7.0 intel/tbb/latest ucx/1.14.1_gnu fftw/3.3.10_intel_serial_sp hdf5/1.14.1-2_intel_intelmpi intel/dnnl/2023.1.0 intel/intel_ippcp_ia32/latest intel/tbb32/2021.9.0 fftw/mpi/3.3.10_gnu_13.1.0_openmpi intel/ccl/2021.9.0 intel/dnnl/latest intel/intel_ippcp_intel64/2021.7.0 intel/tbb32/latest fftw/mpi/3.3.10_intel_2023.1.0_intelmpi intel/ccl/latest intel/dpl/2022.1.0 intel/intel_ippcp_intel64/latest libtool/2.4.6_gnu fftw/omp/3.3.10_gnu_omp intel/dnnl-cpu-gomp/2023.1.0 intel/dpl/latest intel/mkl/2023.1.0 netcdf/c-4.9.2_gnu -------------------------------------------------------------------------- /usr/share/Modules/modulefiles/compilers -------------------------------------------------------------------------- amd/4.0.0 intel/compiler-rt/2023.1.0 intel/compiler-rt32/latest intel/compiler32/2023.1.0 intel/icc/latest julia/1.9.4 R-project/4.3.1_gnu_mkl cmake/3.26.4 intel/compiler-rt/latest intel/compiler/2023.1.0 intel/compiler32/latest intel/icc32/2023.1.0 nvhpc/22.7 gcc/13.1.0 intel/compiler-rt32/2023.1.0 intel/compiler/latest intel/icc/2023.1.0 intel/icc32/latest nvhpc/23.9 ---------------------------------------------------------------------------- /usr/share/Modules/modulefiles/tools ---------------------------------------------------------------------------- apptainer/1.1.6 intel/clck/2021.7.3 intel/debugger/2023.1.0 intel/dpct/2023.1.0 intel/inspector/2023.1.0 intel/oclfpga/2023.1.0 ompp/0.8.5_gnu guix/latest intel/clck/latest intel/debugger/latest intel/dpct/latest intel/inspector/latest intel/oclfpga/latest ompp/0.8.5_itl intel/advisor/2023.1.0 intel/dal/2023.1.0 intel/dev-utilities/2021.9.0 intel/init_opencl/2023.1.0 intel/itac/2021.9.0 intel/vtune/2023.1.0 valgrind/3.21.0 intel/advisor/latest intel/dal/latest intel/dev-utilities/latest intel/init_opencl/latest intel/itac/latest intel/vtune/latest -------------------------------------------------------------------------- /usr/share/Modules/modulefiles/parallel --------------------------------------------------------------------------- intel/mpi/2021.9.0 intel/mpi/latest openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0
This list is not automatically updated so …
1.3. To load a module, use:
module load <module_name>
For example, to load Apptainer, run:
module load Apptainer
1.4. To check the list of loaded modules, run:
module list
For example
$ module list No Modulefiles Currently Loaded. $ module load gcc/13.1.0 openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0 $ module list Currently Loaded Modulefiles: 1) gcc/13.1.0 2) rdma/46.0_gnu 3) ucx/1.14.1_gnu 4) openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0
Some modules may be loaded by others because of dependences
1.6. To switch between two versions of the same module, run:
module switch <old_module> <new_module>
For example
$ module list No Modulefiles Currently Loaded. $ module load nvhpc/22.7 $ module list Currently Loaded Modulefiles: 1) nvhpc/22.7 $ module switch nvhpc/22.7 nvhpc/23.9 $ module list Currently Loaded Modulefiles: 1) nvhpc/23.9
1.8. Introduction
On a computing system, you have software, tools, librairies that come with it at specific version numbers. Sometimes, for your own applications, you have dependencies that need different version number, and you can’t simply replace the previous ones by the newest ones. You have to deal with different versions numbers of the same files on the same machine.
1.9. Module command
The module command lets you manipulate your environnement, especially your environment variables (PATH, LD_LIBRARY_PATH, etc.) by adding new paths to search for files. So you first need to install your needed dependencies somewhere (/usr/local, /opt/software, etc.) and next with the help of a small configuration file, you can’t get access to the other version. The initialization of the module environment and making available the modules are managed by the administrators.
Some examples are given below, and versions displayed may be outdated, so look at the output of the module
command directly on the clusters !
The module command works with switches and some switches have sub-commands. These switches are frequently used ;
module avail |
List the available modules. Note that if there are multiple versions of a single package that one will be denoted as (default). If you load the module without a version number you will get this default version. |
module list |
List all the currently loaded modules. |
module load MODULE |
Load the named module. |
module unload MODULE |
Unload the named module, going back to the previous state. |
module switch OLD-MODULE NEW_MODULE |
replacing a module by an other one. |
module purge |
get to the OS defaults |
module help |
Get general help information about modules. |
module help MODULE |
Get help information about the named module. |
module show MODULE |
Show details about the module, including the changes that loading the module will make to your environment. |
module whatis |
List all the available modules along with a short description. |
1.10. Some comments
The module av
command displays all available modules that can be loaded. Applications and corresponding modules are added regularly by the administrators, at the request of users, so take a look when you’re looking for something.
for special cases, for example python, one version is installed and enhanced with packages. If you need special versions numbers of packages, or incompatible versions with the existing ones, the best solution for you is to work with guix. |
The module load <MODULE>
loads the corresponding MODULE and some variables (like PATH, etc.) of your environment are completed. So you gain access to other versions or new applications.
The module unload MODULE
lets you come back to the previous state regarding what was added, even if other modules are still currently loaded or, in between.
1.11. Shortcuts
Some frequently used switches have short versions :
switch li
stands for list
switch av
stands for avail
or available
etc.
1.12. Some examples
1.12.1. Example 1 : one loads and unloads a single module
$ module list No Modulefiles Currently Loaded. $ module load gcc/13.1.0 $ module list Currently Loaded Modulefiles: 1) gcc/13.1.0 $ module unload gcc/13.1.0 $ module list No Modulefiles Currently Loaded.
1.12.2. Example 2 : one loads several modules together
$ module load gcc/13.1.0 openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0 gmsh/4.11.1_gnu Loading openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0 Loading requirement: rdma/46.0_gnu ucx/1.14.1_gnu $ module li Currently Loaded Modulefiles: 1) gcc/13.1.0 3) ucx/1.14.1_gnu 5) gmsh/4.11.1_gnu 2) rdma/46.0_gnu 4) openmpi/ucx/4.1.5_gcc_8.5.0_ucx_1.14.1_rdma_46.0
As you can see, some other modules have been added to the ones you have selected : they are dependencies and automatically added, as mentioned by the module
command.
1.12.3. Example 3 : unload all currently loaded modules
One can use the purge
switch
$ module load intel/compiler/2023.1.0 intel/mpi/2021.9.0 Loading compiler version 2023.1.0 Loading tbb version 2021.9.0 Loading compiler-rt version 2023.1.0 Load "debugger" to debug DPC++ applications with the gdb-oneapi debugger. Load "dpl" for additional DPC++ APIs: https://github.com/oneapi-src/oneDPL Loading intel/compiler/2023.1.0 Loading requirement: intel/tbb/latest intel/compiler-rt/latest Loading mpi version 2021.9.0 $ module li Currently Loaded Modulefiles: 1) intel/tbb/latest 2) intel/compiler-rt/latest 3) intel/compiler/2023.1.0 4) intel/mpi/2021.9.0 $ module purge Removing mpi version 2021.9.0 Use `module list` to view any remaining dependent modules. Removing compiler version 2023.1.0 Use `module list` to view any remaining dependent modules. Load "debugger" to debug DPC++ applications with the gdb-oneapi debugger. Load "dpl" for additional DPC++ APIs: https://github.com/oneapi-src/oneDPL Removing compiler-rt version 2023.1.0 Use `module list` to view any remaining dependent modules. Removing tbb version 2021.9.0 Use `module list` to view any remaining dependent modules. $ module list No Modulefiles Currently Loaded.
If you use the unload
switch, you get the same result, but you have to write all the module names
1.12.4. Example 4 : one changes the version of the chosen module
If you want to change the version of a module, using a different one, that is available too through the module command, you use the switch
switch.
$ module load nvhpc/22.7 $ module li Currently Loaded Modulefiles: 1) nvhpc/22.7 $ module switch nvhpc/22.7 nvhpc/23.9 $ module li Currently Loaded Modulefiles: 1) nvhpc/23.9