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

Rajeev Thakur thakur at mcs.anl.gov
Mon Apr 23 21:20:28 CDT 2012


One reason is that MPI_Accumulate allows only a restricted form of derived datatype, where all basic elements are of the same type. In MPI_Reduce you can pass any crazy datatype and you get to define the reduction operation for that.

Another reason is that MPI_Accumulate was defined a few years after MPI_Reduce, and at that time no one suggested going back and revising the definition of MPI_Reduce (and until today, 15 years later, no one had either).

Rajeev



On Apr 23, 2012, at 8:40 PM, Jed Brown wrote:

> On Mon, Apr 23, 2012 at 20:36, Rajeev Thakur <thakur at mcs.anl.gov> wrote:
> MPI_Accumulate allows you to do MPI_SUM on a derived datatype. MPI_Reduce does not. It requires you to create your own reduction operation for derived datatypes. MPI_Accumulate, on the other hand, does not allow user-defined reduction operations at all.
> 
> Right, but why is it this way? What was the rationale for not having the same extended capability of predefined operations (a la MPI_Accumulate) apply to reductions? It's obnoxious when exposing a common API that may be implemented in terms of one-sided or collectives.
> _______________________________________________
> mpich-discuss mailing list     mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss



More information about the mpich-discuss mailing list