HDF5

HDF5 (Hierarchical Data Format) is a general purpose library and file format for storing scientific data. HDF5 can store two primary objects: datasets and groups. A dataset is essentially a multidimensional array of data elements, and a group is a structure for organizing objects in an HDF5 file. Using these two basic objects, one can create and store almost any kind of scientific data structure, such as images, arrays of vectors, and structured and unstructured grids. You can also mix and match them in HDF5 files according to your needs.

Installation and Use of HDF5 on LRZ platforms

Linux based HPC Systems

Available versions of HDF5 are given in the following table. Note that the 1.8 API has changed compared to the 1.6 API.

versioned moduleSuperMUCCluster
hdf5/serial/1.6 no yes
hdf5/mpi/1.6 no yes (sgi MPT)
hdf5/serial/1.8 yes yes
hdf5/mpi/1.8 yes yes (Intel MPI, IBM MPI and sgi MPT)

The builds support the Intel C, C++ and Fortran compilers. To make use of HDF5, please load the appropriate Environment Module

For the serial version

module load hdf5/serial

For the parallel version

module load hdf5/mpi

Then, compile your code with

[icc|icpc|ifort] -c $HDF5_INC foo.[c|cc|f90]

and  link it with

[icc|icpc|ifort] -o myprog.exe foo.o <further objects> [$HDF5_F90_LIB|$HDF5_CPP_LIB] $HDF5_LIB $SZIP_LIB -lz

One of the language support libraries $HDF5_F90_LIB or $HDF5_CPP_LIB is only required if either Fortran or C++ are used for compiling and linking your application. For MPI parallel version, the C++ interface is not available.

If you use a parallel HDF5 environment, you typically need to replace the compiler call by its MPI wrapper (mpicc, mpiCC, mpif90).

Utilities

Loading an HDF5 module typically will also make available command-line utilities e.g., h5copy, h5debug, h5dump etc. It may be advisable to run these utilities using a serial (as opposed to MPI parallel) HDF5 version, since a linked-in MPI library may not work properly in purely interactive usage.

Documentation

Please refer to the HDF5 Web Site for documentation of the interface.