Using environment modules it is possible to have different software libraries (versions, compilers) side-by-side and ready to be loaded. Be aware that some libraries are dependent on others. It is recommended to load the highest rank library first to check what dependencies are loaded as well. e.g.:
Bash
1
$moduleloadeccodes/2.18.0-intel-20.0.2-6tadpgr
loads the ECCODES library and all dependencies. e.g. intel compilers, as indicated by the naming.
module list shows the currently loaded modules and reports that 6 libraries need to be loaded as dependencies for ECCODES. Thus, it is not necessary to load the other libraries manually as they are dependencies of ECCODES. However it will be necessary to load the intel compiler suite intel-parallel-studio/composer.2020.2-intel-20.0.2-zuot22y as well for build applications.
using environment modules
1 2 3 4 5 6 7 8 910111213141516171819202122
# unload modules
$moduleunloadeccodes/2.18.0-intel-20.0.2-6tadpgr# unload all modules at once (useful in jobs, before loading the correct ones)
$modulepurge
# show information from a module (defined variables)
$moduleshoweccodes/2.18.0-intel-20.0.2-6tadpgr
-------------------------------------------------------------------
/jetfs/spack/share/spack/modules/linux-rhel8-skylake_avx512/eccodes/2.18.0-intel-20.0.2-6tadpgr:
module-whatisecCodesisapackagedevelopedbyECMWFforprocessingmeteorologicaldatainGRIB(1/2),BUFR(3/4)andGTSheaderformats.
conflicteccodes
prepend-pathPATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/bin
prepend-pathLIBRARY_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/lib
prepend-pathLD_LIBRARY_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/lib
prepend-pathC_INCLUDE_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/include
prepend-pathCPLUS_INCLUDE_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/include
prepend-pathINCLUDE/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/include
prepend-pathPKG_CONFIG_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/lib/pkgconfig
prepend-pathCMAKE_PREFIX_PATH/jetfs/spack/opt/spack/linux-rhel8-skylake_avx512/intel-20.0.2/eccodes-2.18.0-6tadpgreot7jf4yoaiqmqueiihhdcsxk/
-------------------------------------------------------------------
Compilers
GNU
gfortran is available on the default command search path, so it is not essential to load a module, unless: (1) You need to set environment variables such as FC and F77; (2) You need to link MPI libraries. In these cases, you should load the gfortran module. This is what the module does to the environment:
This shows that we have intel-parallel-studio with version 20.0.2 and 17.0.7 installed and intel-oneapi-compilers at version 2021.2.0. The first does not come with Intel-MPI, but the second does.