[Mpi-forum] C++ types inaccessible after #281
ftillier at microsoft.com
Mon Jun 25 22:07:24 CDT 2012
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).
More information about the mpi-forum