hdf5

Introduction:

HDF5 is a file format, library, and utility programs for efficiently managing large and complex datasets stored in files. These files are "self-documenting"; each dataset in the file can be queried by specifying its name, after which the rank, dimensions, arithmetic type, and individual values may be retrieved. The files are portable, so that they can be created and manipulated by programs in various languages, on various machines, and can be shared with other users.

Web site:

https://support.hdfgroup.org/HDF5/

Reference:

  • The HDF Group,
    HDF5 Reference Manual
  • The HDF Group,
    HDF5 User's Guide

Usage:

To check the latest information on available versions of HDF5 on any ARC cluster, type "module spider hdf5".

HDF5 requires that the appropriate modules be loaded before it can be run. One version of the appropriate commands for use on NewRiver is:

module purge
module load gcc/5.2.0
module load hdf5/1.8.16
module load szip/2.1

Examples:

The following batch file compiles and runs a C program that uses the HDF5 library to create, write, and then read an HDF5 file.

#! /bin/bash
#
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe

cd $PBS_O_WORKDIR

module purge
module load gcc/5.2.0
module load hdf5/1.8.16
module load szip/2.1

h5cc hdf5_test.c
mv a.out hdf5_test
./hdf5_test
ls hdf5_test.h5

A complete set of files to carry out a similar process are available in a tar file