HDF5 and NetCDF

HDF5 and NetCDF are open source formats for storing large numerical data in binary format. The latest version of NetCDF uses HDF5 as underling format so it is a dependency when compiled from sources.

HDF5

Several options can be used for compiling HDF5 in particular is important to activate the fortran, C++ and parallel IO with MPI, however C++ is not compatible with MPI and needs to be disable when compiling with MPI

The configure lines below were used to compile HDF5 version 1.10.5

Native compiler on Red Hat Enterprise Linux (RHEL) on Spruce

Serial Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc44 --enable-fortran --enable-cxx

Parallel Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc44_ompi31 --enable-fortran --enable-parallel

Native compiler on Red Hat Enterprise Linux (RHEL) on Thorny

Serial Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc48 --enable-fortran --enable-cxx

Parallel Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc48_ompi31 --enable-fortran --enable-parallel

GCC 8.2.0 on Spruce and Thorny

Serial Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc82 --enable-fortran --enable-cxx

Parallel Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_gcc82_ompi31 --enable-fortran --enable-parallel

Intel Compiler Suite 2018 on Spruce and Thorny

Serial Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_intel18 --enable-fortran --enable-cxx

Parallel Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_intel18_impi18 --enable-fortran --enable-parallel

Intel Compiler Suite 2019 on Spruce and Thorny

Serial Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_intel19 --enable-fortran --enable-cxx

Parallel Version:

../configure --prefix=/shared/software/libs/hdf5/1.10.5_intel19_impi19 --enable-fortran --enable-parallel

NetCDF

There are separate source for C, Fortran and C++,

Modules loaded:

module load lang/intel/2019 libs/hdf5/1.10.5_intel19

Configuration line for the C library:

CC=icc FC=ifort CXX=icpc ../configure --prefix=/shared/software/libs/netcdf/4.7.1_intel19

Results from tests for C:

============================================================================
Testsuite summary for netCDF 4.7.1
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

At this point the module for NetCDF is created and loaded before compiling the Fortran and C++ libraries that rely on it.

Modules loaded:

module load lang/intel/2019 libs/hdf5/1.10.5_intel19 libs/netcdf/4.7.1_intel19

Configuration line for the fortran wrappers:

CC=icc FC=ifort CXX=icpc ../configure --prefix=/shared/software/libs/netcdf/4.7.1_intel19

Results from tests for Fortran:

============================================================================
Testsuite summary for netCDF-Fortran 4.5.2
============================================================================
# TOTAL: 2
# PASS:  2
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

The C++ library is configured the same:

CC=icc FC=ifort CXX=icpc ../configure --prefix=/shared/software/libs/netcdf/4.7.1_intel19

Results from tests for C++ are:

============================================================================
Testsuite summary for netCDF-cxx4 4.3.1
============================================================================
# TOTAL: 8
# PASS:  8
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================