[petsc-dev] OpenMPI && petsc-2.3.3-p15
Satish Balay
balay at mcs.anl.gov
Wed Jan 6 14:45:33 CST 2010
There was also a need to not include 'stdio.h' before mpi.h [for c++]
- and we can't control this usage in user code. MPICH_SKIP_MPICXX has
prevented this issue form coming up.
[Perhaps newer versions of mpich/openmpi workarround this - but some
users might still be using some older versions - or derivatives of
mpich - where this issue would come up.]
So I prefer keeping this flag - and perhaps have the rule: the few
c++/mpi users should include 'mpi.h' and/or 'mpicxx.h' directly from
their code - before including petsc.h.
Satish
On Wed, 6 Jan 2010, Barry Smith wrote:
>
> Eric,
>
> Could you describe, preferably with error messages printed by compilers
> etc, why this is necessary? I read the comment in petsc.h
>
>
> PETSc does not use the C++ binding of MPI at ALL. The following flag
> makes sure the C++ bindings are not included. The C++ bindings REQUIRE
> putting mpi.h before ANY C++ include files, we cannot control this
> with all PETSc users.
> */
>
> but could not reproduce the problem (I put C++ include files before mpi.h
> without that flag and everything compiled and ran fine for both MPICH and
> OpenMPI on my Apple).
>
> Do we really need the flags. I have no problem putting in the OpenMPI also,
> but it does mean that PETSc users cannot use the C++ bindings of MPI (which
> some may want to). So I would like to avoid both flags unless they are really
> needed.
>
> Thanks
>
> Barry
>
>
> On Jan 6, 2010, at 8:21 AM, Eric Chamberland wrote:
>
> > Hi,
> >
> > we have compile petsc-2.3.3-p15 with openMPI 1.3.4. To have it working
> > with our C++ code, I did a "#define OMPI_SKIP_MPICXX".
> >
> > In petsc.h, this is already done but for MPICH, on line #137:
> >
> > #define MPICH_SKIP_MPICXX 1
> >
> > It would be nice to also have a:
> >
> > #define OMPI_SKIP_MPICXX" 1
> >
> > But I don't know if it would be necessery also in petsc release 3.
> >
> > Thank you!
> >
> > Eric
>
More information about the petsc-dev
mailing list