HDF4

Software Category
Version
4.2.13

HDF4

Introduction

HDF4 is one of four HDF packages available on RCC Systems (the others being HDF5, h5py and HDFView). HDF (both versions 4 and 5) are essentially data storage formats for scientific data. The HDF4 package also comes with numerous tools for working with and analyzing scientific data in HDF files as well as an API for working with HDF files in code.

Using HDF4 on RCC Resources

HDF4 is primarily used as a library for programs in either C or Fortran. Detailed examples can be found on the main website's examples page. To compile a file using HDF4 on RCC Systems, you must choose either Intel or PGI compilers and then compile your code as follows:

# Example is for Intel (icc)
module load intel

icc -c TEST.c -I /opt/hpc/intel/include/hdf
icc TEST.o -o EXENAME -L /opt/hpc/intel/lib64/hdf -ldf

# Example for GNU (gcc)
module load gnu

gcc -c TEST.c -I /opt/hpc/gnu/include/hdf
gcc TEST.o -o EXENAME -L /opt/hpc/gnu/lib64/hdf -ldf