HDF5 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.
HDF5 is available without restriction to all OSC users.
Different versions of HDF5 are available on the various OSC clusters.
* - Default version
To use the HDF5 library, first run the following command:
module load hdf5
module load hdf5-serial
The HDF5 library provides the following variables for use at build time:
||Use during your compilation step for C programs|
||Use during your compilation step for C++ programs (serial version only)|
||Use during your compilation step for FORTRAN programs|
||Use during your linking step programs|
||Use during your linking step for FORTRAN programs|
For example, to build the code myprog.c or myprog.f90 with the hdf5 library you would use:
icc -c $HDF5_C_INCLUDE myprog.c icc -o myprog myprog.o $HDF5_C_LIBS ifort -c $HDF5_F90_INCLUDE myprog.f90 ifort -o myprog myprog.o $HDF5_F90_LIBS
You must load the hdf5 module in your batch script before executing a program which is built with the hdf5 library
#PBS -N AppNameJob #PBS -l nodes=1:ppn=12 module load hdf5 cd $PBS_O_WORKDIR cp foo.dat $TMPDIR cd $TMPDIR appname cp foo_out.h5 $PBS_O_WORKDIR