[petsc-dev] Detecting MPI_C_DOUBLE_COMPLEX when clanguage!='C'
Satish Balay
balay at mcs.anl.gov
Mon Apr 23 20:59:13 CDT 2012
On Mon, 23 Apr 2012, Barry Smith wrote:
>
> On Apr 23, 2012, at 7:51 PM, Jed Brown wrote:
>
> > if self.getDefaultLanguage() == 'C': mpitypes.extend([('MPI_C_DOUBLE_COMPLEX', 'c-double-complex')])
> >
> > Why don't we check for this regardless of C language? The C and C++ types are binary compatible and there is an advantage to using the predefined data types: it lets us also use the predefined MPI_Ops, which would let us use MPIU_SUM with PetscSF (and possibly use more optimized reduction implementations in other cases).
>
>
> Though this may always work are they technically really binary compatible and does MPI (the standard) really support complex in C++ since it is not the same as complex in C?
>
> Yes this mostly academic bullshit and we should try to see if it works with C++ in BuildSystem also.
Well it didn't work on mpich/windows - and as per the following discussion - I made
that change.
http://trac.mcs.anl.gov/projects/mpich2/ticket/1525
Satish
More information about the petsc-dev
mailing list