Softwares

Access softwares through module

CPU nodes (Kyle, Sar) now feature the spack/module software installation system.

This means that a number of user libraries (e.g. openblas, openmpi, abinit, ...) are no longer available through system installations.

But Spack should greatly facilitate the deployment of new software. Combined with module, it allows several concurrent versions to be made available, so let us know about your library needs!

To use these tools, you need to use "Module". Let's take OpenBLAS as an example.

Example with OpenBLAS

Interactive job

If you want to do an interactive session, you start by allocating a compute node:

[username@chome:~]$ srun --nodes=1 --time=00:30:00 -p cpu_inter --pty /bin/bash

You can now check which versions are available with the command module avail openblas:

[username@kyle01:~]$ module avail openblas

------------------------------------------------------------ /softwares/spack/share/spack/modules/linux-ubuntu22.04-skylake_avx512/libraires -------------------------------------------------------------
   openblas/0.3.23/gcc-13.1.0

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".

Or with module spider openblas:

[username@kyle01:~]$ module spider openblas

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  openblas/0.3.23: openblas/0.3.23/gcc-13.1.0
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    This module can be loaded directly: module load openblas/0.3.23/gcc-13.1.0

    Help:
      Name   : openblas
      Version: 0.3.23
      Target : skylake_avx512

      OpenBLAS: An optimized BLAS library

Then, once you know which version you want to use, you can load it with the command module load what_you_want_to_load (here openblas/0.3.23/gcc-13.1.0):

[username@kyle01:~]$ module load openblas/0.3.23/gcc-13.1.0

At the end of you session, you can unload it with module purge openblas (or module purge if you want to unload all the modules).

Finally, note that you can check which modules are loaded (and under which version) at any time with the module list command:

[username@kyle01:~]$ module list

Currently Loaded Modules:
  1) openblas/0.3.23/gcc-13.1.0



[username@kyle01:~]$ module purge
[username@kyle01:~]$ module list
No modules loaded

Batch job

With a batch job, simply load all the modules you want before the rest of your code:

#!/bin/bash 

#SBATCH --job-name=some_job_name
#SBATCH --nodes=1
#SBATCH --partition=cpu_prod
#SBATCH --time=1:00:00
#SBATCH --output=logslurms/slurm-%j.out
#SBATCH --error=logslurms/slurm-%j.err

# Module load
module purge
module load openblas/0.3.23/gcc-13.1.0

# Following by your job commands

Available modules

You can check all available modules with module avail or module spider.

[username@kyle01:~]$ module spider

----------------------------------------------------------------------------
The following is a list of the modules and extensions currently available:
----------------------------------------------------------------------------
  gcc/13.1.0: gcc/13.1.0/gcc-11.4.0

  lmod/8.7.24: lmod/8.7.24/gcc-13.1.0

  openblas/0.3.23: openblas/0.3.23/gcc-13.1.0

  openmpi/4.1.5: openmpi/4.1.5/gcc-13.1.0

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

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

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

The current list of available modules can be viewed here.