ML with OpenMPI

Lisandro Dalcin dalcinl at gmail.com
Tue Mar 25 11:32:32 CDT 2008


OK. Now all is clear to me. Sorry about my confusion.  So I have to
conclude that ML machinery for including headers is a bit broken, I
think. Many thanks for your explanation.


On 3/25/08, Jed Brown <jed at 59a2.org> wrote:
> No, ML was built correctly.  The build output has -DHAVE_CONFIG_H on every build
>  line.  What *is* happening is that the headers included by ksp/pc/impls/ml/ml.c
>  were essentially for a non-MPI build because HAVE_CONFIG_H was not defined.
>  That is, including ml_config.h defines the autoconf'd macros (like HAVE_MPI) and
>  ml_common.h uses them to set ML-local macros (like ML_MPI) *only* if
>  HAVE_CONFIG_H is defined.  So when we include ml_include.h without defining
>  HAVE_CONFIG_H, we see the interface for a default (non-MPI) build.  This
>  interface is (apparently) the same as an MPI build with MPICH2, but not with
>  OpenMPI.  Since the library was built with MPI, there was no dangerous type
>  casting, and you were using it with MPI, there was no problem.  When using
>  OpenMPI, it sees a conflict between the ML's dummy MPI interface and OpenMPI's
>  because ML and MPICH2 use MPI_Comm = int while OpenMPI uses an opaque pointer
>  value.
>
>
>  > Looking at ML configure script and generated makefiles, in them there
>  > is a line saying>
>  >
>  > DEFS = -DHAVE_CONFIG_H
>  >
>  > Do you have that line? Next, this $(DEFS) is included in compiler
>  > command definition.
>  >
>  > Additionally, I did
>  >
>  > $ nm -C libml.a | grep MPI
>  >
>  > and undefined references to the MPI functions appered as expected.
>  >
>  >
>  > Sorry about my insinstence, but I believe we need to figure out what's
>  > exactly going on.
>
>
> No problem.  I agree it is important.  Does my explanation above make sense to
>  you?
>
>
>  Jed
>
>


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list