Hdf5
Jump to navigation
Jump to search
To compile a serial program that uses HDF5, use module to set your paths correctly, then link the libraries at compile time. In this example, the imaginary test.c uses both the base HDF5 libraries and the newer high-level routines (i.e. it has #include "hdf5.h" and #include "hdf5_hl.h"), so needs libhdf5 and libhdf5_hl:
module purge module load intel hdf5/184-p1-v18-serial
icc -o test test.c -lhdf5_hl -lhdf5 -limf
#or, if you prefer to be explicit,
icc -o test test.c -L${SCINET_HDF5_LIB} -lhdf5_hl -lhdf5 -limf