Using pre-installed softwares with Module command

Several software components (compiler, libraries, software, etc.) as Environment Modules/Lmod are available on the Cholesky cluster. If you do not find what you want, you should to ask the support team to make it available for you either :

  • in your HOME directory ;
  • in the general tree structure of modules if this may be of interest to a certain number of users ;

Note

The support team reserves the right to limit the number of versions of a software available from the general tree structure. In particular, for Python only the Anaconda distribution will be maintained. Anaconda ditribution allows easily to install all combinations of Python modules with Conda. However, if you want to have a specific version of Python without the Anaconda environment, you can follow this procedure.

Cholesky uses hierarchical modules, what that means is that loading a module makes more modules available by updating the module path where the module manager looks for modules. This is especially useful to avoid dependency problems, and has been used on Cholesky to avoid compiler and OpenMPI/Intel MPI conflicts and incompatibilities.

The module command allows you to dynamically and automatically configure your environment by adding and modifying variables (such as your $PATH variable) in order to load software components used by your application or code. These modifications are easily reversible by unloading the modules.

Available modules

module avail

The module avail command reports modules that can be loaded directly on your environment. This command may not list some modules that are incompatible with the modules you loaded. To see a list of modules other than those loaded and available to you, use the module spider command documented below.

$ module avail

--------------------------------- /mnt/beegfs/softs/opt/modulefiles/core ---------------------------------
   anaconda3/2020.11    cuda/10.2     intel_compiler/19.1.3.304    singularity/3.7.2
   cmake/3.19.7         gcc/10.2.0

Use "module spider" to find all possible modules.
Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".

Note

  • Modules marked by a (D) information are loaded by default if no version is mentionned when loading with module load command.
  • Modules marked by a (L) information are already loaded.

module spider

The module spider command reports all the modules that can be loaded on your environment.

There are three modes to module spider :

1. module spider: Report all modules.
2. module spider <name> : Report all the versions for the modules that match <name>.
3. module spider <name/version>: Report detailed information on a particular module version.
------------------------------------------------------------------------------------------------------
The following is a list of the modules currently available:
------------------------------------------------------------------------------------------------------
  anaconda3: anaconda3/2020.11
    Python environment

  boost: boost/1.75.0
    Boost provides free peer-reviewed portable C++ source libraries

  cmake: cmake/3.19.7
    CMake is an open-source, cross-platform family of tools designed to build, test and package
    software.

  cuda: cuda/10.2


  fftw: fftw/3.3.9
    Fastest Fourier Transform in the West

  fftw_mpi: fftw_mpi/3.3.9
    Fastest Fourier Transform in the West

  gcc: gcc/10.2.0
    The GNU Compiler Collection

  hdf4: hdf4/4.2.15
    Hierarchical Data Format (HDF)

  hdf5: hdf5/1.12.0
    A general purpose library and file format for storing scientific data

  hdf5_mpi: hdf5_mpi/1.12.0

  intel_compiler: intel_compiler/19.1.3.304

  intel_mkl: intel_mkl/2020.0.4

  intel_mpi: intel_mpi/2019.9

  openmpi: openmpi/4.1.0
    OpenMPI library

  singularity: singularity/3.7.2
    Application and environment virtualization

  udunits: udunits/2.2.28
    The UDUNITS package supports units of physical quantities. Its C library provides for arithmetic
    manipulation of units and for conversion of numeric values between compatible units.

------------------------------------------------------------------------------------------------------

To learn more about a package execute:

   $ module spider Foo

where "Foo" is the name of a module.

To find detailed information about a particular package you
must specify the version if there is more than one version:

   $ module spider Foo/11.1

------------------------------------------------------------------------------------------------------

You can get informations about particular modules by adding one or more names or regular expressions. For example :

$ module spider hdf5

------------------------------------------------------------------------------------------------------
  hdf5:
------------------------------------------------------------------------------------------------------
    Description:
      A general purpose library and file format for storing scientific data

     Versions:
        hdf5/1.12.0
     Other possible modules matches:
        hdf5_mpi

------------------------------------------------------------------------------------------------------
  To find other possible module matches execute:

      $ module -r spider '.*hdf5.*'

------------------------------------------------------------------------------------------------------
  For detailed information about a specific "hdf5" module (including how to load the modules) use the module's full name.
  For example:

     $ module spider hdf5/1.12.0
------------------------------------------------------------------------------------------------------

Then, if you need more details about module hdf5 :

$ module spider hdf5/1.12.0

------------------------------------------------------------------------------------------------------------------------------------------------------
  hdf5: hdf5/1.12.0
------------------------------------------------------------------------------------------------------------------------------------------------------
    Description:
      A general purpose library and file format for storing scientific data (Serial Version)


    You will need to load all module(s) on any one of the lines below before the "hdf5/1.12.0" module is available to load.

      gcc/10.2.0
      intel_compiler/19.1.3.304

    Help:
      This module loads the HDF5 library version 1.12.0.

The modules names contains 3 informations :

  • The product name: hdf5
  • The product version: 1.12.0
  • The modules required by the product: gcc/10.2.0 or intel_compiler/19.1.3.304

Load a module

The module load (or ml) command adds one or more modules to your current session.

Note

You could use keyboard touch to autocomplete module name and version.

$ module load intel/19.1.3.304
$ module load openmpi3

Swap or Switch a module

The module swap command permit to change from one module to another module like a compiler, a library.

  • For example, you wish to switch from INTEL compiler to GCC compiler :
$ modulel load intel_compiler
$ module load gcc/10.2.0 
Lmod has detected the following error: You can only have one compiler module loaded at a time.
You already have intel_compiler loaded.
To correct the situation, please execute the following command:

  $ module swap intel_compiler gcc/10.2.0


While processing the following module(s):
    Module fullname  Module Filename
    ---------------  ---------------
    gcc/10.2.0       /mnt/beegfs/softs/opt/modulefiles/core/gcc/10.2.0.lua
$ module swap intel_compiler gcc/10.2.0
$ module list

Currently Loaded Modules:
  1) gcc/10.2.0
  • A another example, you load INTEL compiler and OpenMPI library and you wish to switch to INTEL MPI library :
$ module load intel_compiler/19.1.3.304
$ module load openmpi/4.1.0 
$ module list

Currently Loaded Modules:
  1) intel_compiler/19.1.3.304   2) openmpi/4.1.0
$ module swap openmpi intel_mpi/2019.9
$ module list

Currently Loaded Modules:
  1) intel_compiler/19.1.3.304   2) intel_mpi/2019.9

List loaded modules

The module list command lists the modules which are currently loaded in your environment.

$ module list

Currently Loaded Modules:
  1) intel_compiler/19.1.3.304   2) intel_mpi/2019.9

Unload a module

The module unload option unloads a software component (make it unreachable by your environment by removing the proper paths from your environment variables).

$ module unload intel_mpi/2019.9 
$ module list

Currently Loaded Modules:
  1) intel_compiler/19.1.3.304

The module purge option unloads all loaded software components.

$ module purge
$ module list
No modules loaded

Useful commands

module  avail | av                    list available software (modules)
module  load | add [module]           set up the environment to use the software
module  list                          list currently loaded software
module  purge                         clears the environment
module  spider                        list all possible modules
module  swap | sw | switch  m1 m2     unload m1 and load m2
module  show                          show the commands in the module file
module  help                          get help

Using openMPI and Intel MPI modules

Important

Following the integration of the CPHT and Hopper clusters in Cholesky, you must imperatively use the mpilaunch wrapper instead of the mpirun binaries which dynamically choose the IB transport layer according to the nodes on which the jobs are executed.

  • For OpenMPI use openmpi/4.1.4 :
$ module load gcc/10.2.0
$ module load openmpi/4.1.4
$ mpilaunch
  • For Intel MPI use intel_mpi/2019.9 :
$ module load intel_compiler/19.1.3.304
$ module load intel_mpi/2019.9
$ mpilaunch