Difference between revisions of "Hdf5"
Jump to navigation
Jump to search
m |
m |
||
Line 1: | Line 1: | ||
+ | {{OutOfDate}} | ||
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: | 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: | ||
Revision as of 16:17, 17 June 2013
WARNING: The last edit of this page is over two years old. The information on this page may be out-of-date. |
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
And remember when you run the program that you must have loaded module hdf5/184-p1-v18-serial