Compilers and Libraries
A brief description of the two C/C++/Fortran compilers available for the Linux platforms is given next together with the way to access them with the ”module” system. The software tree has the most recent version of each compiler but earlier versions are also kept to insure usage consistency for a specific task (a research project, a Ph.D. or M.Sc. work, etc). The user is responsible for the choice of the compiler version to use.
Compilers
Gnu Compiler Collection: The GNU Compiler Collection (http://gcc.gnu.org) includes front-ends for C, C++, Objective-C, Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj, ...).
e.g. access : module load gcc/9.2.0
commands : gcc, c++, cpp, g++, gcov, gfortran, ...
Intel Compilers: The Intel Parallel Studio XE product family (http://software.intel.com/en-us/intel-parallel-studio-xe) offers C, C++ and Fortran compilers combined with the performance-oriented Intel Math Kernel Library, Intel Integrated Performance Primitives and Intel Threading Building Blocks.
e.g. access : module load intel/23.2.1
commands : icc, ifort, ...
Libraries
Message Passing Interface (MPI) is a standardized and portable message-passing system designed for computers capable of parallel processing. The following MPI implementations are available:
openmpi (http://www.open-mpi.org/)e.g. access : module load openmpi/4.1.4-static-intel23
commands : mpicc, mpif77, mpif90, …
mpich (http://www.mpich.org/)e.g. access : module load mpich/4.0.3-static-intel23
commands : mpicc, mpif77, mpif90, …
The commands above are simply wrappers which call the respective compiler (GNU, Intel, NAG or PGI) including the appropriate include paths and the appropriate library linking directives (as seen if issuing, e.g., “mpif90 –show”).
Network Common Data Form (NetCDF) is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data (http://www.unidata.ucar.edu/software/netcdf). Many user applications use input/output in NetCDF format. Compiling those applications involve linking them against the NetCDF libraries, which generally makes use of a Makefile. The correct INCLUDE and LIBRARY paths can be obtained using the “nc-config” and “nf-config” scripts, available in the main installation path.
In the Makefile of a C application, the user can for instance define the variables:
NETCDF_INCLUDE = -I$(shell /sw/buster-x64/netcdf_c-4.8.1-static-gccsys/bin/nc-config --includedir)
NETCDF_LIBRARY = $(shell /sw/buster-x64/netcdf_c-4.8.1-static-gccsys/bin/nc-config --libs)
In the Makefile of a Fortran application, the user can for instance define the variables:
NETCDF_INCLUDE = -I$(shell /sw/buster-x64/netcdf_fortran-4.6.0-static-intel23/bin/nf-config --includedir)
NETCDF_LIBRARY = $(shell /sw/buster-x64/netcdf_fortran-4.6.0-static-intel23/bin/nf-config --flibs)
Those variables can then be used in the compiling sequence.
Alternatively, the user can run those scripts in the command line and copy+paste the output into the Makefile, adding the –I flag in the case of the include directory.
> /sw/buster-x64/netcdf_c-4.8.1-static-gccsys/bin/nc-config --includedir
/sw/buster-x64/netcdf_c-4.8.1-static-gccsys/include
> /sw/buster-x64/netcdf_c-4.8.1-static-gccsys/bin/nc-config --libs
-L/sw/buster-x64/netcdf_c-4.8.1-static-gccsys/lib -L/sw/buster-x64/libaec-1.0.6-gccsys/lib -ldl -L/sw/buster-x64/hdf5-1.14.0-static-gccsys/lib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lzip -lcurl -lsz -lm