[mpich-discuss] Why do predefined MPI_Ops function elementwise in MPI_Accumulate, but not in MPI-1 routines?

Dave Goodell goodell at mcs.anl.gov
Tue Apr 24 12:57:36 CDT 2012


On Apr 24, 2012, at 9:37 AM CDT, Jed Brown wrote:

> If the above is a reasonable thing for a user to request, then either (a) MPI_Accumulate must accept user-defined MPI_Ops, (b) MPI_SUM must operate on the base elements of a derived type for collectives (instead of just for MPI_Accumulate), or (c) the issue is delayed by adding a non-deprecated predefined std::complex<double> type.
> 
> I think that both (a) and (b) should be done because then we could do __float128 or quaternions without having to change the standard. (I cannot currently use __float128 with one-sided, so any time I use one-sided because it's a better algorithmic fit, I will also have to implement the algorithm using MPI-1 so that __float128 works.)

(a) is potentially doable, but you'll need additional functionality to register operations that doesn't currently exist in MPI.  Also, it would be difficult to pass in the MPI Forum.

(b) is much more feasible, assuming you apply the same restrictions about having only a single basic datatype.

(c) has the advantage of making MPI_PROD work correctly as well even if (a) is not permitted.

Out of curiosity, how do you feel about just cheating a bit and using MPI_C_DOUBLE_COMPLEX for this particular use case?  Do you believe the risk of some sort of mismatch between C's _Complex and std::complex to be too great?

-Dave



More information about the mpich-discuss mailing list