[petsc-dev] Detecting MPI_C_DOUBLE_COMPLEX when clanguage!='C'

Barry Smith bsmith at mcs.anl.gov
Mon Apr 23 20:12:44 CDT 2012


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.

   Barry





More information about the petsc-dev mailing list