<div class="gmail_quote">On Mon, Apr 23, 2012 at 20:29, Jeff Hammond <span dir="ltr">&lt;<a href="mailto:jhammond@alcf.anl.gov">jhammond@alcf.anl.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":45s">I was under the impression that the use for MPI_Accumulate was a<br>
proper subset of MPIReduce, etc.</div></blockquote><div><br></div><div>So did I, until recently.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":45s">
  What part of the standard leads you<br>
to believe that restrictions pertaining to MPI_Reduce, etc. are<br>
stricter than for MPI_Accumulate?<br></div></blockquote></div><br><div>Well, both MPICH2 and Open MPI error saying it is unsupported and section 5.9.2 (Predefined Reduction Operations) has no verbiage indicating that they should work with any derived datatypes.</div>
<div><div><br></div><div><i>&quot;For the other predefined operations, we enumerate below the allowed combinations of op and datatype arguments.&quot;</i></div></div><div><br></div><div><br></div><div><div>#include &lt;mpi.h&gt;</div>
<div>#include &lt;stdio.h&gt;</div><div><br></div><div>int main(int argc, char *argv[])</div><div>{</div><div>  MPI_Datatype MPIMe_2DOUBLE;</div><div>  double local[2],global[2];</div><div>  int rank,size;</div><div><br></div>
<div>  MPI_Init(&amp;argc,&amp;argv);</div><div>  MPI_Comm_rank(MPI_COMM_WORLD,&amp;rank);</div><div>  MPI_Comm_size(MPI_COMM_WORLD,&amp;size);</div><div>  MPI_Type_contiguous(2,MPI_DOUBLE,&amp;MPIMe_2DOUBLE);</div><div>  MPI_Type_commit(&amp;MPIMe_2DOUBLE);</div>
<div>  local[0] = (double)rank;</div><div>  local[1] = (double)size;</div><div>  MPI_Allreduce(local,global,1,MPIMe_2DOUBLE,MPI_MAX,MPI_COMM_WORLD);</div><div>  if (!rank) printf(&quot;global [%g,%g]\n&quot;,global[0],global[1]);</div>
<div>  MPI_Finalize();</div><div>  return 0;</div><div>}</div></div><div><br></div>