You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Several compiler families and MPI flavours are provided on the system. 

When you log in, the GNU prgenv with GCC would be loaded by default, but can be easily changed by a different one by loading it explicitly with. For example, to use the Intel Programming Environment or toolchain:

module load prgenv/intel

Compiler default versions for each family are:

CompilerVersion
GCC8.4.1
Intel2021.4.0
AOCC3.1.0

For MPI, Vendor OpenMPI, intel MPI and HPCX OpenMPI are available. The default version for each family are:

MPI flavourVersion
Atos OpenMPI4.1.1.1
Intel MPI2021.4.0
HPCX OpenMPI2.9.0

Best combination for performance

The recommended toolchain for performance at this stage is:

Currently Loaded Modules:
  1) intel/2021.4.0   2) prgenv/intel   3) hpcx-openmpi/2.9.0   4) intel-mkl/19.0.5

Additional dependencies

When building your application, model or little post-processing tool, you may require some additional dependencies or libraries. Before you raise an issue or start building them on your own, please check if they are not already provided either through by default system or via modules with module spider.

If you find them in modules, you can make use of the environment variables defined there to configure your build scripts.

You can see what variables are defined in a module by running:

module show yourdependency

Typically, a module will define the following variables, besides some others that may be needed for each particular package to work:

VariableWhen it is definedExample value
PATHIf the package comes with binaries of executables, they will make it into your PATH/usr/local/apps/netcdf4/4.7.4/GNU/8.3/bin
MANPATHIf the package has got man pages, they will then be made available/usr/local/apps/netcdf4/4.7.4/GNU/8.3/share/man
<PACKAGE>_DIRPath to the prefix of the installation of this particular package/usr/local/apps/netcdf4/4.7.4/GNU/8.3
<PACKAGE>_VERSIONVersion of the package4.7.4
<PACKAGE>_INCLUDEIf the package contains a library, it defines the flags to be used for preprocessing and finding headers-I/usr/local/apps/netcdf4/4.7.4/GNU/8.3/include
<PACKAGE>_LIBIf the package contains a library, it defines the flags to be used at linking time-L/usr/local/apps/netcdf4/4.7.4/GNU/8.3/lib -Wl,-rpath,/usr/local/apps/netcdf4/4.7.4/GNU/8.3/lib -lnetcdff -lnetcdf_c++ -lnetcdf
Example of variables defined in a module
$ module show netcdf4
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                         
   /usr/local/apps/modulefiles/lmod/flavours/gnu/8.3/netcdf4/4.7.4.lua:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------                         
setenv("netcdf4_DIR","/usr/local/apps/netcdf4/4.7.4/GNU/8.3")
setenv("NETCDF4_DIR","/usr/local/apps/netcdf4/4.7.4/GNU/8.3")
setenv("netcdf4_VERSION","4.7.4")
setenv("NETCDF4_VERSION","4.7.4")
family("netcdf")
prepend_path("PATH","/usr/local/apps/netcdf4/4.7.4/GNU/8.3/bin")
prepend_path("MANPATH","/usr/local/apps/netcdf4/4.7.4/GNU/8.3/share/man")
prepend_path("INFOPATH","/usr/local/apps/netcdf4/4.7.4/GNU/8.3/share/info")
setenv("NETCDF4_LIB","-L/usr/local/apps/netcdf4/4.7.4/GNU/8.3/lib -Wl,-rpath,/usr/local/apps/netcdf4/4.7.4/GNU/8.3/lib -lnetcdff -lnetcdf_c++ -lnetcdf")                                                           
setenv("NETCDF4_INCLUDE","-I/usr/local/apps/netcdf4/4.7.4/GNU/8.3/include")
whatis("NetCDF (Network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.")                  
help([[NetCDF (Network Common Data Form) is a set of software libraries and machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. It is also a community standard for sharing scientific data. The Unidata Program Center supports and maintains netCDF programming interfaces for C, C++, Java, and Fortran. Programming interfaces are also available for Python, IDL, MATLAB, R, Ruby, and Perl.
For more information visit https://www.unidata.ucar.edu/software/netcdf/
]])

Best practices

  • Avoid hardcoding any paths to the dependencies locations in your build or configure scripts. Use the environment variables defined by modules wherever possible instead.
  • Always favour using the $<PACKAGE>_INCLUDE and $<PACKAGE>_LIB environment variables to add into your compilation or linking flags. If your build scripts/system does not allow it, then make sure to use $<PACKAGE>_DIR as the base location.
  • If defining linking flags manually, do not forget to add the rpath: -Wl,-rpath,$<PACKAGE>_DIR/lib so your application works at runtime. Using LD_LIBRARY_PATH is strongly discouraged.
  • No labels