Skip to content

Modules

Application environment and library management

Commands

Type module help for all the options of the module command

  • module avail : list available modules
  • module avail app_name : list available modules for the indicated application
  • module help app_name/version : display the online help (if available) for the indicated application
  • module load app_name/version : load the environment of the indicated module
  • module unload app_name/version : unload the environment of the indicated module
  • module list : list the loaded environments
  • module purge : unload all the environments previously loaded

Case of libraries

For libraries, loading a module activates environment variables that can be included in a Makefile ($(HDF5_INC), $(HDF5_C_LIBS) or $(HDF5_FORTRAN_LIBS) in the following example).

Example: display option listing what loading (load option) a module would apply:

[login@boreale-front1 ~]$ module display hdf5/nec/1.10.5/parallel 
-------------------------------------------------------------------
/soft/Modules/Modules-boreale/vecto/hdf5/nec/1.10.5/parallel:

prepend-path PATH /soft/vecto/hdf5-1.10.5-parallel/bin
setenv HDF5_HOME /soft/vecto/hdf5-1.10.5-parallel
setenv HDF5_INC -I/soft/vecto/hdf5-1.10.5-parallel/include
prepend-path NCC_INCLUDE_PATH /soft/vecto/hdf5-1.10.5-parallel/include
prepend-path NFORT_INCLUDE_PATH /soft/vecto/hdf5-1.10.5-parallel/include
prepend-path VE_LIBRARY_PATH /soft/vecto/hdf5-1.10.5-parallel/lib
prepend-path VE_LIBRARY_PATH /soft/vecto/zlib-1.2.11/lib
prepend-path VE_LIBRARY_PATH /soft/vecto/szip-2.1.1/lib
setenv HDF5_C_LIBS {-lhdf5_hl -lhdf5 -lz -lsz -ldl}
setenv HDF5_FORTRAN_LIBS {-lhdf5_fortran -lhdf5_hl -lhdf5 -lz -lsz -ldl}
display hdf5/nec/1.10.5/parallel environment (with no C++ support)
-------------------------------------------------------------------

Last update: November 25, 2022 14:05:21