Software Category


HDF4 is one of four HDF packages available on RCC Systems (the others being HDF5, h5py, and HDFView). HDF (both versions 4 and 5) is essentially a data storage format 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 C or Fortran programs. Detailed examples can be found on the official website's examples page. To compile a file using HDF4 on RCC Systems, you must choose either the Intel or PGI compiler and then compile your code using the following commands. Replace TEST with the name of your C file and EXENAME with what you would like to name your executable file.

# Example for Intel compiler (icc)
module load intel
icc -c TEST.c -I /opt/rcc/intel/include/hdf
icc TEST.o -o EXENAME -L /opt/rcc/intel/lib64/hdf -ldf

# Example for GNU compiler (gcc)
module load gnu
gcc -c TEST.c -I /opt/rcc/gnu/include/hdf
gcc TEST.o -o EXENAME -L /opt/rcc/gnu/lib64/hdf -ldf

For more information on HDF4, please refer to the official documentation.