2 missing symbols: h5pset_fapl_mpio_f_ , h5pset_dxpl_mpio_f_

Hi, I'm new to HDF5 and to this list.

I have identical problem on 2 different platforms:

- linux, hdf5-1.8.12, Intel 16.0.2 compiler, Intel MPI 1.6.5
- FreeBSD 11.0-RELEASE-p2, mpich-3.2_2, hdf5-1.10.0_1, gcc6-6.2.0 compiler

I build a third party library
which includes several HDF5 routines.
On both systems at link time I get:

undefined reference to `h5pset_fapl_mpio_f_'
undefined reference to `h5pset_dxpl_mpio_f_'

On FreeBSD hdf5 port installs these static libs:

-rw-r--r-- 1 root wheel 7304706 Nov 30 17:34 libhdf5.a
-rw-r--r-- 1 root wheel 823562 Nov 30 17:34 libhdf5_cpp.a
-rw-r--r-- 1 root wheel 381772 Nov 30 17:34 libhdf5_fortran.a
-rw-r--r-- 1 root wheel 215264 Nov 30 17:34 libhdf5_hl.a
-rw-r--r-- 1 root wheel 14100 Nov 30 17:34 libhdf5_hl_cpp.a
-rw-r--r-- 1 root wheel 166530 Nov 30 17:34 libhdf5hl_fortran.a

On linux I see these libs:

-rw-r--r-- 1 root root 8305240 Jan 22 2014 libhdf5.a
-rw-r--r-- 1 root root 957780 Jan 22 2014 libhdf5_cpp.a
-rw-r--r-- 1 root root 427560 Jan 22 2014 libhdf5_fortran.a
-rw-r--r-- 1 root root 297166 Jan 22 2014 libhdf5_hl.a
-rw-r--r-- 1 root root 9022 Jan 22 2014 libhdf5_hl_cpp.a
-rw-r--r-- 1 root root 162250 Jan 22 2014 libhdf5hl_fortran.a

but the symbols are not there:

$ for file in `ls libhdf5*.a`; do nm $file |grep h5pset_fapl_mpio; done
$ for file in `ls libhdf5*.a`; do nm $file |grep h5pset_dxpl_mpio; done
$

Am I looking in the wrong place?
Wrong version?
Wrong installation?

Please advise

Thanks

Anton

"Hdf-forum on behalf of Anton Shterenlikht" wrote:

Hi, I'm new to HDF5 and to this list.

I have identical problem on 2 different platforms:

- linux, hdf5-1.8.12, Intel 16.0.2 compiler, Intel MPI 1.6.5
- FreeBSD 11.0-RELEASE-p2, mpich-3.2_2, hdf5-1.10.0_1, gcc6-6.2.0 compiler

I build a third party library
which includes several HDF5 routines.
On both systems at link time I get:

undefined reference to `h5pset_fapl_mpio_f_'
undefined reference to `h5pset_dxpl_mpio_f_'

Is the HDF5 library you are linking to compiled *for* parallel? It *has* to have been configured with --enable-parallel *and* also linked with MPI.

I suspect you don't have any MPI routines in your installations of HDF5. To check, do this....

for file in `ls libhdf5*.a`; do nm $file |grep -i mpi; done

*Iff* it has been compiled for parallel, you should see a slew of symbols like...

                 U _MPI_Allreduce
                 U _MPI_Barrier
                 U _MPI_Bcast
                 U _MPI_Comm_dup
                 U _MPI_Comm_free
                 U _MPI_Comm_rank
                 U _MPI_Comm_size
                 U _MPI_Error_string
                 U _MPI_File_close
                 U _MPI_File_get_atomicity
                 U _MPI_File_get_size
                 U _MPI_File_open
                 U _MPI_File_read_at
                 U _MPI_File_read_at_all
                 U _MPI_File_set_atomicity
                 U _MPI_File_set_size
                 U _MPI_File_set_view
                 U _MPI_File_sync
                 U _MPI_File_write_at

Otherwise, it wasn't compiled for parallel. Go back and re-configure and re-compile it for parallel.

HTH

···

--
Mark C. Miller, LLNL

"You learn more about a man by what he says about
others than by what others say about him." AH

From miller86@llnl.gov Mon Dec 5 17:45:58 2016

Is the HDF5 library you are linking to compiled *for* parallel? It *has* to=
have been configured with --enable-parallel *and* also linked with MPI.

Thanks. I think you are right.
On linux there's some misconfig in modules:

module show libraries/intel_builds/hdf5-1.8.12-par

···

-------------------------------------------------------------------
/cm/shared/modulefiles/libraries/intel_builds/hdf5-1.8.12-par:

module-whatis adds HDF5-1.8.12 Parallel build to your environment variables
module add intel-cluster-studio/compiler/64/13.1/117 openmpi/intel/64/1.6.5
append-path PATH /cm/shared/libraries/intel_build/hdf5-1.8.12-par/bin
append-path LD_LIBRARY_PATH /cm/shared/libraries/intel_build/netcdf-4/lib

The lib path is wrong. Because I was loading both
hdf5 and netcdf modules I haven't noticed this before.
I'll ask the sysadmin to fix.
The correct path does have static libs with these symbols:

1$ for file in `ls libhdf5*.a`; do nm $file |grep dxpl_mpio_f; done
0000000000000040 T h5fdmpio_mp_h5pget_dxpl_mpio_f_
0000000000000030 T h5fdmpio_mp_h5pset_dxpl_mpio_f_

On FreeBSD the default HDF5 port build does not include the parallel
options. I tried just now and got:

configure: error: --enable-cxx and --enable-parallel flags are incompatible.
Use --enable-unsupported to override this error.

I'll ask the FreeBSD HDF5 port maintainer about
the correct set of flags.

Many thanks

Anton