[Dune] Re: hdf5 and dune

Patrick Leidenberger patrick.leidenberger at psi.ch
Wed Aug 9 17:54:58 CEST 2006


Hi Markus,

I have installed hdf5 in parallel with:
   CC='mpicc' F9X='mpif90' CFLAGS='-fPIC' LDFLAGS='-fPIC'
    CPPFLAGS='-fPIC'
    ./configure --prefix=/home/patrick/extlib/hdf5-1.6.5
    --with-pic --disable-shared


In libhdf5.a I found with nm the following sections:
..
000014d3 T H5open
...
         U H5open
..

with the changed hdf5.m4 I get the following result executing
dunecontrol all:

...
checking grape.h presence... no
checking for grape.h... no
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for HDF5_LIBS=-lhdf5 in -lhdf5... no
checking for mpicc... mpicc
checking for MPI_Init... yes
checking for mpi.h... yes
configure: Trying to identify the version of mpicc
checking for lam... no
checking for mpich... yes
checking whether compiling with MPICH works... yes
checking whether running with MPICH works... yes
...

Found the following Dune-components:

-----------------------------

ALBERTA..........: no
ALUGrid..........: yes
AmiraMesh........: no
BLAS-lib.........: no
Grape............: no
HDF5.............: yes
MPI..............: yes (MPICH)
METIS............: yes
ParMETIS.........: yes
SuperLU..........: no
SuperLU-DIST.....: no
OpenGL...........: yes
UG...............: no

-----------------------------


with the original hdf5.m4 I get:
...
checking for grape.h... no
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for H5open in -lhdf5... no
checking for mpicc... mpicc
checking for MPI_Init... yes
checking for mpi.h... yes
configure: Trying to identify the version of mpicc
checking for lam... no
checking for mpich... yes
checking whether compiling with MPICH works... yes
checking whether running with MPICH works... yes
checking for /usr/local/ug/include/gm.h... no

Found the following Dune-components:

-----------------------------

ALBERTA..........: no
ALUGrid..........: yes
AmiraMesh........: no
BLAS-lib.........: no
Grape............: no
HDF5.............: no
MPI..............: yes (MPICH)
METIS............: yes
ParMETIS.........: yes
SuperLU..........: no
SuperLU-DIST.....: no
OpenGL...........: yes
UG...............: no

-----------------------------


That's strange!

I have attatched the config.log files for both cases. I hope that's a
help for you.


Best wishes

Patrick



Markus Blatt schrieb:
> Hi,
> 
> On Wed, Aug 09, 2006 at 04:16:42PM +0200, Patrick Leidenberger wrote:
>> The only thing I have to change in hdf5.m4 is at line 43. The original is:
>> AC_CHECK_LIB(hdf5, H5open,[HDF5_LIBS=-lhdf5],[HAVE_HDF5=0]) #,-lz, -lsz)
>>
>> the changed is
>> AC_CHECK_LIB(hdf5,[HDF5_LIBS=-lhdf5],[HAVE_HDF5=0]) #,-lz, -lsz)
>>
> 
> And this really works? Suspicous! Actually (in the first statement) it
> is checked whether the lib hdf5 contains a function H5open and if it
> does HDF5_LIBS is set to -lhdf5 otherwise HAVE_HDF5 is set 0.
> 
> In your case it checks for a function [HDF5_LIBS=-lhdf5] which
> definitely is not there. Therefore HAVE_HDF5 is not set to 0 (this
> would be the case if it was found). I suppose nonexistent arguments
> get treated as null statements.
> 
> Documentation directly from the m4-Source:
> 
> # AC_CHECK_LIB(LIBRARY, FUNCTION,
> #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
> #              [OTHER-LIBRARIES])
> # ------------------------------------------------------
> #
> # Use a cache variable name containing both the library and function
> # name,
> # because the test really is for library $1 defining function $2, not
> # just for library $1.  Separate tests with the same $1 and different
> # $2s
> # may have different results.
> #
> # Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])
> # is asking for troubles, since AC_CHECK_LIB($lib, fun) would give
> # ac_cv_lib_$lib_fun, which is definitely not what was meant.  Hence
> # the AS_LITERAL_IF indirection.
> #
> # FIXME: This macro is extremely suspicious.  It DEFINEs
> # unconditionally,
> # whatever the FUNCTION, in addition to not being a *S macro.  Note
> # that the cache does depend upon the function we are looking for.
> #
> # It is on purpose we used `ac_check_lib_save_LIBS' and not just
> # `ac_save_LIBS': there are many macros which don't want to see `LIBS'
> # changed but still want to use AC_CHECK_LIB, so they save `LIBS'.
> # And ``ac_save_LIBS' is too tempting a name, so let's leave them some
> # freedom
> 
> So the lib is not found, but the test will not complain, too.
> 
> The question is:
> - Is there a function H5open in hdf5 (I do not know hdf5, but I guess
>   the one writing the test kew that there is.
> - If there is. The library is probably not found in the default
>   library path. (Take a look at dune-common/config.log what autconf
>   complains about. Probably ld does not find libhdf5).
> - If that is the case: where is the lib installed? (And why does
> --with-hdf5=path_to_hdf5 get ignored?)
> 
> Cheers,
> 
> Markus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_original.log
Type: text/x-log
Size: 89996 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20060809/9f5d9c8c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_changed.log
Type: text/x-log
Size: 89476 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20060809/9f5d9c8c/attachment-0001.bin>


More information about the Dune mailing list