[Mpi-forum] C++ types inaccessible after #281

Fab Tillier ftillier at microsoft.com
Mon Jun 25 23:51:09 CDT 2012


Ah, thanks, sorry for being dense (I'm not familiar with the C++ bindings as we don't ship them for MSMPI).

Ticket 281 removes the entire C++ bindings from the standard, MPI::COMPLEX included.  You'd need to convince your MPI library vendor to keep supplying you with an MPI-2.2 compliant version of the C++ bindings (which is still allowed by ticket #281).

Hopefully someone with more experience with the C++ bindings can chime in, but I'd expect the answer to your original question is yes, ticket #281 intentionally removes all C++ support from MPI-3.

-Fab

Jed Brown wrote on Mon, 25 Jun 2012 at 21:31:55

> MPI::COMPLEX is not the same as MPI_C_COMPLEX (and the latter is not
> available on systems without C99).

> On Jun 25, 2012 8:21 PM, "Fab Tillier" <ftillier at microsoft.com> wrote:
> Hi Jed,
> 
> Maybe I'm not following you, but what predefined MPI datatype supports
> std::complex today?  My understanding is that there is no support for
> std::complex in MPI today, and that ticket 281 does not change this at
> all.
> 
> Thanks,
> -Fab
> 
> Jed Brown wrote on Mon, 25 Jun 2012 at 20:42:53
> 
>> I see that std::complex will not be accessible in a predefined type if
>> #281 passes in its current form. Do you intend for there to be a
>> supported/recommended way for a C++ caller to get a complex predefined
>> (so that one-sided can be used) type? Note that C99 is not a subset of
>> any C++ and C99 complex cannot be used portably from C++ (even with
>> compiler suites that happen to support both).
>> 
>> On Jun 25, 2012 7:07 PM, "Fab Tillier" <ftillier at microsoft.com
>> <mailto:ftillier at microsoft.com> > wrote: Hi Jed,
>> 
>> Jed Brown wrote on Mon, 25 Jun 2012 at 16:43:54
>> 
>>> Is it intended that #281 would make std::complex inaccessible? Should
>>> there be a MPI_CXX_COMPLEX, MPI_CXX_DOUBLE_COMPLEX,
>>> MPI_CXX_LONG_DOUBLE_COMPLEX, and (possibly) MPI_CXX_BOOL?
>> 
>> I don't think ticket #281 does anything with respect to std::complex
>> accessibility.  The MPI standard defines the MPI_C_COMPLEX and family
>> as mapping to the C99 _Complex type (see Table 3.2, Predefined MPI
>> datatypes corresponding to C datatypes).  The standard is clear that
>> there are no corresponding C++ bindings.
>> 
>>> Note that C99 complex is not a substitute because Microsoft does not
>>> implement it and it has different semantics regarding numerical
>>> stability. (Well, C99 semantics are specified and useful, std::complex
>>> stability is not specified by any C++ standard and in practice, is not
>>> implemented in a stable way.) This is not such a big deal for use with
>>> collectives because user-defined MPI_Ops can be used, but only
>>> predefined types can be used with one-sided operations, so presence of
>>> complex datatypes (or lack thereof) is relevant to applications.
>> 
>> The fact that Microsoft does not support C99 is lame.  You can probably
>> get away using std::complex as a stand-in for C99 _Complex (but then
>> you're on your own), or move to a compiler that does (I believe the
>> Intel compiler supports C99 on Windows).
>> 
>> -Fab
>> 
>




More information about the mpi-forum mailing list