Skip to content

Module command

IPSL mesocenter ( ciclad and climserv ) uses module command for software initialization

Syntax:

module (avail [product] | load product[/version] | list | switch product/version1 product/version2 | display product[/version] ...)

  • avail : list all known product and versions
  • load : initialize a product in his default version if no version is specified
  • list : list already loaded product and version
  • switch : changing the version of already loaded product
  • purge : unload product
  • display : show the module file

Product could be a compiler, a library or a software

Sample

[xxxxxx@loholt1 ~]$ module avail

---------------------------------- /usr/share/Modules/modulefiles ----------------------------------
dot         module-git  module-info modules     null        use.own

------------------------------------ /etc/modulefiles/Compilers ------------------------------------
gnu/4.4.7(default)        intel/12.1.3.293(default) nagfor/6.0(default)
gnu/4.9.3                 intel/15.0.6.233          pgi/2013(default)
gnu/7.2.0                 nagfor/5.3                pgi/2016

------------------------------------ /etc/modulefiles/Libraries ------------------------------------
cmor/2.9.1-gfortran            netcdf4/4.2.1.1-pgf2013        openmpi/1.4.5-ifort
grib_api/1.15.0                netcdf4/4.3.3.1-gfortran       openmpi/1.4.5-pgf2011
hdf5/1.8.10.patch1-gfortran    netcdf4/4.3.3.1-gfortran49     openmpi/1.4.5-pgf2011gcc
hdf5/1.8.10.patch1-ifort       netcdf4/4.3.3.1-ifort          openmpi/1.4.5-pgf2013
hdf5/1.8.10.patch1-pgf2011     netcdf4/4.3.3.1-pgf2013        openmpi/1.4.5-pgfgcc
hdf5/1.8.10.patch1-pgf2013     netcdf4/4.3.3.1-pgf2016        openmpi/1.6.5-gfortran
hdf5/1.8.14-gfortran           netcdf4/4.4.1.1-parallel-ifort openmpi/1.6.5-ifort
hdf5/1.8.14-gfortran49         oasis3-mct/2.0-gfortran        openmpi/1.6.5-pgf2011
hdf5/1.8.14-ifort              oasis3-mct/2.0-ifort           openmpi/1.6.5-pgf2013
hdf5/1.8.14-pgf2013            oasis3-mct/2.0-pgf2013         openmpi/1.6.5-pgfgcc
hdf5/1.8.14-pgf2016            oasis3-mct-nc43/2.0-gfortran   openmpi/1.8.8-gfortran49
hdf5/1.8.18-parallel-ifort     oasis3-mct-nc43/2.0-ifort      pnetcdf/1.8.1-ifort
netcdf4/4.2.1.1-gfortran       oasis3-mct-nc43/2.0-pgf2013    uuid/1.6.2
netcdf4/4.2.1.1-ifort          openmpi/1.10.2-pgf2016
netcdf4/4.2.1.1-pgf2011        openmpi/1.4.5-gfortran

------------------------------------ /etc/modulefiles/Products -------------------------------------
cdo/1.6.8(default)               grads/2.2.1.oga.1-opengrads      nco/4.6.9
cdo/1.9                          idl/6.4(default)                 nco/4.7.x
ferret/6.7.2(default)            idl/8.2                          python/2.7.3-epd7
ferret/6.9                       julia/0.6.0                      python/2.7.6-canopy-1.3(default)
ferret/6.93                      matlab/2010b.sp2                 python/2.7-anaconda
ferret/6.96                      matlab/2013b(default)            python/2.7-anaconda50
ferret/7.4.3                     matlab/2017b                     python/3.4-anaconda3
git/2.7.4                        ncl/6.1.2(default)               python/3.6-anaconda50
gmt/4.5.11(default)              ncl/6.3.0                        scilab/5.4.1(default)
gnu-parallel/20181122            ncl/6.4.0                        scilab/5.5.1
grads/2.0.2(default)             ncl/6.6.2                        svn/1.8.15
grads/2.0.2.oga.2-opengrads      nco/4.3.7(default)
grads/2.1.a2.oga.1-opengrads     nco/4.5.2

------------------------------------- /home/modulefiles/Users --------------------------------------
climaf/1.2.10          climaf/1.2.13          climaf/1.2.8test       TeX-live/2017
climaf/1.2.11          climaf/1.2.13_beta     climaf/devel-js
climaf/1.2.12(default) climaf/1.2.8           climaf/pre_1.2.12
[xxxxxx@loholt1 ~]$ 

Using module

[xxxxxx@loholt1 ~]$ gfortran --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright © 2010 Free Software Foundation, Inc.

[xxxxxx@loholt1 ~]$ module load gnu/7.2.0 
[xxxxxx@loholt1 ~]$ gfortran --version
GNU Fortran (GCC) 7.2.0
Copyright © 2017 Free Software Foundation, Inc.

[xxxxxx@loholt1 ~]$ type matlab
matlab est /opt/matlab-2013b/matlab
[xxxxxx@loholt1 ~]$ module load matlab/2017b 
[xxxxxx@loholt1 ~]$ type matlab
matlab est /opt/matlab/2017b/matlab
[xxxxxx@loholt1 ~]$ module list
Currently Loaded Modulefiles:
  1) gnu/7.2.0      2) matlab/2017b
[xxxxxx@loholt1 ~]$ module purge
[xxxxxx@loholt1 ~]$ module list
No Modulefiles Currently Loaded.
[xxxxxx@loholt1 ~]$ module display ncl/6.6.2
-------------------------------------------------------------------
/etc/modulefiles/Products/ncl/6.6.2:

prepend-path     PATH /opt/ncl-6.6.2/bin 
setenv           NCARG_ROOT /opt/ncl-6.6.2 
-------------------------------------------------------------------

[xxxxxx@loholt1 ~]$