The -show switch of the wrapper script will show you exactly what flags and libraries it's using to compile a program. For example, on my system:

$ ./h5cc -show
gcc -I/usr/pppl/gcc/6.1-pkgs/szip-2.1/include -L/usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5_hl.a /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5.a -L/usr/pppl/gcc/6.1-pkgs/szip-2.1/lib -lrt -lsz -lz -ldl -lm -Wl,-rpath -Wl,/usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib

$ ./h5fc -show
gfortran -I/usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/include -L/usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5hl_fortran.a /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5_hl.a /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5_fortran.a /usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib/libhdf5.a -L/usr/pppl/gcc/6.1-pkgs/szip-2.1/lib -lrt -lsz -lz -ldl -lm -Wl,-rpath -Wl,/usr/pppl/gcc/6.1-pkgs/hdf5-serial-1.8.17/lib

From the above, you can see that it for Fortran, it is using libhdf5hl_fortran libhdf5_hl libhdf5_fortran, and libhdf5

Since there's a good chance you and I used different configure options when building HDF5, you should use the -show switch with your own wrappers, and not just copy what you see here.

Prentice

On 08/12/2016 10:59 AM, Akshay Subramaniam wrote:
Hi,

I'm trying to compile my application with HDF5 on a BG/Q system. If I use mpixlf2008_r -I<hdf5_path>/include -L<hdf5_path>/lib -lhdf5_fortran, I get linking errors saying undefined references to a bunch of hdf5 routines. If I use the h5pfc wrapper though, I am able to compile my program, but I want to avoid doing that. What is the right way of compiling a parallel HDF5 fortran program without using the compiler wrapper?

-- Akshay


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to