<p>MPI::COMPLEX is not the same as MPI_C_COMPLEX (and the latter is not available on systems without C99).</p>
<div class="gmail_quote">On Jun 25, 2012 8:21 PM, "Fab Tillier" <<a href="mailto:ftillier@microsoft.com">ftillier@microsoft.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jed,<br>
<br>
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.<br>

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