CMake vs configure/make: why different results?

Hello,

I usually compile the HDF5 library with the commands:
./configure --prefix=${INSTALL} --enable-fortran --enable-trace --enable-parallel
make
make install
and I get in particular the compiler wrappers h5fpc and h5pc. No problem with this method.

I have to use CMake now for the same results and here are the options used, with the same sources (hdf5-1.8.8):
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL} \
-DCMAKE_C_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpicc \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpiCC \
-DCMAKE_Fortran_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpif90 \
-DBUILD_TESTING:BOOL=ON -DMPI_LIBRARY:FILEPATH=/usr/local/openmpi/1.5.3-intel/lib/libmpi.so \
-DMPI_INCLUDE_PATH:STRING=/usr/local/openmpi/1.5.3-intel/include/ \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_HL_LIB:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DMPIEXEC_NUMPROC_FLAG:STRING=-np \
-DMPIEXEC_MAX_NUMPROCS:STRING=4096 \
\"-DMPIEXEC_PREFLAGS:STRING=-N 1 -d 1\" \
-DMPIEXEC:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpirun ..

Here come the problems:
- The different libraries are not of the same size (i.e., libhdf5.a has 19M with configure method and 8.4M with the other)
- There are not the compiler wrappers anymore for helping me
- I get a lot of undefined reference messages related to the hdf5 lib
- ctest failed on parallel stuffs...

Why those two compilation methods produce different results? I mean, what did I do wrong with CMake?
I thought that CMake should only prepare the Makefiles... I have learned things about CMake to understand what happens... not so easy!

Does anyone else use CMake and get the compiler wrappers?

Best,

Stephane

Stéphane,
    Hello!
       I'm glad to see another platform using the CMake build for HDF5, however, please understand that the CMake project started for the Windows platform and we have had limited usage on other platforms. Please visit our CDash site (http://cdash.hdfgroup.uiuc.edu) for known submissiions.

As for your issues, yes we have not implemented the wrapper scripts. This is because of the previous mentioned start on the Windows platform, and our reliance on the community to provide CMake coding for other platforms.
The size difference might be attributted to the use of --enable-trace for the autotools/configure build and not enabling it in the CMake options?
Finally, we have not had anyone try OpemMPI with CMake - just mpich2.

I am willing to provide help in improving this configuration of CMake-built HDF5 and with your cooperation we could add another platform to our list.

Allen

···

Hello,

I usually compile the HDF5 library with the commands:
./configure --prefix=${INSTALL} --enable-fortran --enable-trace --enable-parallel
make
make install
and I get in particular the compiler wrappers h5fpc and h5pc. No problem with this method.

I have to use CMake now for the same results and here are the options used, with the same sources (hdf5-1.8.8):
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL} \
-DCMAKE_C_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpicc \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpiCC \
-DCMAKE_Fortran_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpif90 \
-DBUILD_TESTING:BOOL=ON -DMPI_LIBRARY:FILEPATH=/usr/local/openmpi/1.5.3-intel/lib/libmpi.so \
-DMPI_INCLUDE_PATH:STRING=/usr/local/openmpi/1.5.3-intel/include/ \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_HL_LIB:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DMPIEXEC_NUMPROC_FLAG:STRING=-np \
-DMPIEXEC_MAX_NUMPROCS:STRING=4096 \
\"-DMPIEXEC_PREFLAGS:STRING=-N 1 -d 1\" \
-DMPIEXEC:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpirun ..

Here come the problems:
- The different libraries are not of the same size (i.e., libhdf5.a has 19M with configure method and 8.4M with the other)
- There are not the compiler wrappers anymore for helping me
- I get a lot of undefined reference messages related to the hdf5 lib
- ctest failed on parallel stuffs...

Why those two compilation methods produce different results? I mean, what did I do wrong with CMake?
I thought that CMake should only prepare the Makefiles... I have learned things about CMake to understand what happens... not so easy!

Does anyone else use CMake and get the compiler wrappers?

Best,

Stephane

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Allen,

I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
But now I would like make some progress.
Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.

With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:

/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
...
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'

There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.

I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!

Is this mean something for anyone?? I know what a undefined reference means, why there??

Best,

Stephane

Stéphane,
    The undefined references seem to indicate it is looking for parallel references? Maybe the fortran library failed to build properly, or didn't include a parallel library? Is H5_HAVE_PARALLEL defined in the H5pubconf.h file? h5pset_fapl_mpio_c is in the H5FDmpiof.c file which should be in the libhdf5_f90cstub library.

Allen

···

Allen,

I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
But now I would like make some progress.
Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.

With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:

/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
...
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
/home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
/home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'

There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.

I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!

Is this mean something for anyone?? I know what a undefined reference means, why there??

Best,

Stephane

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Allen,

I just checked: H5_HAVE_PARALLEL is set to 1 in the file H5pubconf.h. And I put libhdf5_f90cstub in my LDFLAGS...
I must admit that I am a bit lost this time!
Is there a way to test the libraries ? I mean, the compilation process does not complain, my CMake parameters, sent before, are right, so I guess that my link process is wrong...
By the way, why libhdf5_f90cstub is present with CMake and not with autotools?

All of this is due to the CMake...grrr

Best,

Stephane

···

On Apr 17, 2012, at 8:41 PM, Allen D Byrne wrote:

Stéphane,
    The undefined references seem to indicate it is looking for parallel references? Maybe the fortran library failed to build properly, or didn't include a parallel library? Is H5_HAVE_PARALLEL defined in the H5pubconf.h file? h5pset_fapl_mpio_c is in the H5FDmpiof.c file which should be in the libhdf5_f90cstub library.

Allen

> Allen,
>
> I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
> But now I would like make some progress.
> Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.
>
> With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:
>
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
> ...
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'
>
> There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.
>
> I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!
>
> Is this mean something for anyone?? I know what a undefined reference means, why there??
>
> Best,
>
> Stephane
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>

After you compiled HDF5 with MinGW and CMake did you run the HDF5 tests? If all the tests pass then this would indicate an error in your Makefiles. If lots of the tests fail then this would indicate an error in the CMake side of things.

···

--
Mike Jackson <www.bluequartz.net>

On Apr 17, 2012, at 3:06 PM, Stéphane Backaert wrote:

Allen,

I just checked: H5_HAVE_PARALLEL is set to 1 in the file H5pubconf.h. And I put libhdf5_f90cstub in my LDFLAGS...
I must admit that I am a bit lost this time!
Is there a way to test the libraries ? I mean, the compilation process does not complain, my CMake parameters, sent before, are right, so I guess that my link process is wrong...
By the way, why libhdf5_f90cstub is present with CMake and not with autotools?

All of this is due to the CMake...grrr

Best,

Stephane

On Apr 17, 2012, at 8:41 PM, Allen D Byrne wrote:

Stéphane,
    The undefined references seem to indicate it is looking for parallel references? Maybe the fortran library failed to build properly, or didn't include a parallel library? Is H5_HAVE_PARALLEL defined in the H5pubconf.h file? h5pset_fapl_mpio_c is in the H5FDmpiof.c file which should be in the libhdf5_f90cstub library.

Allen

> Allen,
>
> I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
> But now I would like make some progress.
> Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.
>
> With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:
>
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
> ...
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
> /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
> /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'
>
> There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.
>
> I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!
>
> Is this mean something for anyone?? I know what a undefined reference means, why there??
>
> Best,
>
> Stephane
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Mike,
I am under the assumption that this is a different issue and Stephane is not using MinGW.
Allen

The original email was using these parameters:

I have to use CMake now for the same results and here are the options used, with the same sources (hdf5-1.8.8):
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL} \
-DCMAKE_C_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpicc \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpiCC \
-DCMAKE_Fortran_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpif90 \
-DBUILD_TESTING:BOOL=ON -DMPI_LIBRARY:FILEPATH=/usr/local/openmpi/1.5.3-intel/lib/libmpi.so \
-DMPI_INCLUDE_PATH:STRING=/usr/local/openmpi/1.5.3-intel/include/ \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_HL_LIB:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DMPIEXEC_NUMPROC_FLAG:STRING=-np \
-DMPIEXEC_MAX_NUMPROCS:STRING=4096 \
\"-DMPIEXEC_PREFLAGS:STRING=-N 1 -d 1\" \
-DMPIEXEC:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpirun ..

···

After you compiled HDF5 with MinGW and CMake did you run the HDF5 tests? If all the tests pass then this would indicate an error in your Makefiles. If lots of the tests fail then this would indicate an error in the CMake side of things.
--
Mike Jackson <www.bluequartz.net>

On Apr 17, 2012, at 3:06 PM, Stéphane Backaert wrote:

> Allen,
>
> I just checked: H5_HAVE_PARALLEL is set to 1 in the file H5pubconf.h. And I put libhdf5_f90cstub in my LDFLAGS...
> I must admit that I am a bit lost this time!
> Is there a way to test the libraries ? I mean, the compilation process does not complain, my CMake parameters, sent before, are right, so I guess that my link process is wrong...
> By the way, why libhdf5_f90cstub is present with CMake and not with autotools?
>
> All of this is due to the CMake...grrr
>
> Best,
>
> Stephane
>
> On Apr 17, 2012, at 8:41 PM, Allen D Byrne wrote:
>
>> Stéphane,
>> The undefined references seem to indicate it is looking for parallel references? Maybe the fortran library failed to build properly, or didn't include a parallel library? Is H5_HAVE_PARALLEL defined in the H5pubconf.h file? h5pset_fapl_mpio_c is in the H5FDmpiof.c file which should be in the libhdf5_f90cstub library.
>>
>> Allen
>>
>> > Allen,
>> >
>> > I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
>> > But now I would like make some progress.
>> > Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.
>> >
>> > With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:
>> >
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
>> > ...
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
>> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
>> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'
>> >
>> > There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.
>> >
>> > I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!
>> >
>> > Is this mean something for anyone?? I know what a undefined reference means, why there??
>> >
>> > Best,
>> >
>> > Stephane
>> >
>> > _______________________________________________
>> > Hdf-forum is for HDF software users discussion.
>> > Hdf-forum@hdfgroup.org
>> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>> >
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Doh. I got my email threads mixed up. Sorry for the noise.

···

___________________________________________________________
Mike Jackson

On Apr 17, 2012, at 3:38 PM, Allen D Byrne wrote:

Mike,
I am under the assumption that this is a different issue and Stephane is not using MinGW.
Allen

The original email was using these parameters:

I have to use CMake now for the same results and here are the options used, with the same sources (hdf5-1.8.8):
cmake -DCMAKE_INSTALL_PREFIX:STRING=${INSTALL} \
-DCMAKE_C_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpicc \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpiCC \
-DCMAKE_Fortran_COMPILER:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpif90 \
-DBUILD_TESTING:BOOL=ON -DMPI_LIBRARY:FILEPATH=/usr/local/openmpi/1.5.3-intel/lib/libmpi.so \
-DMPI_INCLUDE_PATH:STRING=/usr/local/openmpi/1.5.3-intel/include/ \
-DHDF5_BUILD_FORTRAN:BOOL=ON \
-DHDF5_BUILD_HL_LIB:BOOL=ON \
-DHDF5_BUILD_TOOLS:BOOL=ON \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON \
-DMPIEXEC_NUMPROC_FLAG:STRING=-np \
-DMPIEXEC_MAX_NUMPROCS:STRING=4096 \
\"-DMPIEXEC_PREFLAGS:STRING=-N 1 -d 1\" \
-DMPIEXEC:FILEPATH=/usr/local/openmpi/1.5.3-intel/bin/mpirun ..

> After you compiled HDF5 with MinGW and CMake did you run the HDF5 tests? If all the tests pass then this would indicate an error in your Makefiles. If lots of the tests fail then this would indicate an error in the CMake side of things.
> --
> Mike Jackson <www.bluequartz.net>
>
> On Apr 17, 2012, at 3:06 PM, Stéphane Backaert wrote:
>
> > Allen,
> >
> > I just checked: H5_HAVE_PARALLEL is set to 1 in the file H5pubconf.h. And I put libhdf5_f90cstub in my LDFLAGS...
> > I must admit that I am a bit lost this time!
> > Is there a way to test the libraries ? I mean, the compilation process does not complain, my CMake parameters, sent before, are right, so I guess that my link process is wrong...
> > By the way, why libhdf5_f90cstub is present with CMake and not with autotools?
> >
> > All of this is due to the CMake...grrr
> >
> > Best,
> >
> > Stephane
> >
> > On Apr 17, 2012, at 8:41 PM, Allen D Byrne wrote:
> >
> >> Stéphane,
> >> The undefined references seem to indicate it is looking for parallel references? Maybe the fortran library failed to build properly, or didn't include a parallel library? Is H5_HAVE_PARALLEL defined in the H5pubconf.h file? h5pset_fapl_mpio_c is in the H5FDmpiof.c file which should be in the libhdf5_f90cstub library.
> >>
> >> Allen
> >>
> >> > Allen,
> >> >
> >> > I will look into this HDF5-CMake issue a bit further: I think I can learn a lot from this investigation!
> >> > But now I would like make some progress.
> >> > Basically, my only problem is the linking of my code with the hdf5-vfd libraries. I can link my code with h5 libraries compiled with configure/make, with h5pfc (easy) but also without it. Actually, I already took care of those libraries explicitly/manually in my makefile. So I can link without h5pfc.
> >> >
> >> > With the CMake libraries (and thus without h5pfc), here is the kind of messages I get when I link my code with hdf5:
> >> >
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5_ff.f90.o): In function `h5lib_mp_h5open_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0x2e): undefined reference to `h5init_types_c_'
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xba): undefined reference to `h5init_flags_c_'
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5_ff.f90:(.text+0xc8): undefined reference to `h5init1_flags_c_'
> >> > ...
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x17): undefined reference to `h5pset_fapl_mpio_c_'
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpio_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x27): undefined reference to `h5pget_fapl_mpio_c_'
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_dxpl_mpio_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x37): undefined reference to `h5pset_dxpl_mpio_c_'
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_dxpl_mpio_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x47): undefined reference to `h5pget_dxpl_mpio_c_'
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pset_fapl_mpiposix_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x74): undefined reference to `h5pset_fapl_mpiposix_c_'
> >> > /home/ucl/tfl/sbackaer/local/stow/hdf5-vfd-1.8.8_cmake/lib/libhdf5_fortran.a(H5FDmpioff.f90.o): In function `h5fdmpio_mp_h5pget_fapl_mpiposix_f_':
> >> > /home/ucl/tfl/sbackaer/local/build/hdf5-vfd-1.8.8/fortran/src/H5FDmpioff.f90:(.text+0x90): undefined reference to `h5pget_fapl_mpiposix_c_'
> >> >
> >> > There are hundreds of lines like those!! All messages are only related to libhdf5_fortran.a.
> >> >
> >> > I had to adapt my makefile because there are two new libraries: libhdf5_f90cstub and libhdf5_hl_f90cstub but it is the same explicit way of linking as "configure/make"!
> >> >
> >> > Is this mean something for anyone?? I know what a undefined reference means, why there??
> >> >
> >> > Best,
> >> >
> >> > Stephane
> >> >
> >> > _______________________________________________
> >> > Hdf-forum is for HDF software users discussion.
> >> > Hdf-forum@hdfgroup.org
> >> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
> >> >
> >
> > _______________________________________________
> > Hdf-forum is for HDF software users discussion.
> > Hdf-forum@hdfgroup.org
> > http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@hdfgroup.org
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org
>