[petsc-dev] OpenMPI && petsc-2.3.3-p15

Matthew Knepley knepley at gmail.com
Wed Jan 6 14:43:49 CST 2010


On Wed, Jan 6, 2010 at 2:27 PM, Barry Smith <bsmith at mcs.anl.gov> 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).
>

I got this problem initially. It may be that Mac has a different version
where it does not happen. MPICH in its header #defines things that
exist in some C++ headers, so after they are included the define barfs.

  Matt


> 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
>>
>
>


-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20100106/a105976c/attachment.html>


More information about the petsc-dev mailing list