MPICH2, at least 1.0.5, has a more specific way to ignore the SEEK_* issue. What PETSc is currently doing is just completelly skipping the #include of MPI C++ bindings. In OpenMPI, they try hard to solve this issue and not just generate an error like MPICH2, however, compilation time is (about 4x) increased as they have to include <iostream>.
I believe doing #define MPICH_SKIP_MPICXX #define OMPI_SKIP_MPICXX #include <mpi.h> Should always work and then PETSc follows the same path for both MPI's. Of course, if users want to use C++ bindings, then they have to #include <mpi.h> before #include <petsc.h>, but it's up to them to solve the issues with MPICH2. On 9/10/07, Barry Smith <bsmith at mcs.anl.gov> wrote: > > Actually it is the MPI standard and C++ namespaces etc that cause > tis funny problem, MPICH just picked a particular work-around. > I do not know what work around, if any, OpenMPI used. > > Barry > > > On Mon, 10 Sep 2007, Matthew Knepley wrote: > > > Not sure. This only happens because MPICH does funny things with SEEK_SET. > > > > Matt > > > > On 9/10/07, Lisandro Dalcin <dalcinl at gmail.com> wrote: > > > We currently do the following in petsc.h > > > > > > #define MPICH_SKIP_MPICXX 1 > > > #include "mpi.h" > > > > > > Should do the same for OpenMPI ? > > > > > > > > > -- > > > 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 > > > > > > > > > > > > -- 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
