Hdf5

From oldwiki.scinet.utoronto.ca
Revision as of 10:36, 30 September 2010 by Cneale (talk | contribs) (beginning of HDF5 information page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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