<div dir="ltr">On Tue, Jan 1, 2013 at 7:49 PM, Jeff Hammond <span dir="ltr"><<a href="mailto:jhammond@alcf.anl.gov" target="_blank">jhammond@alcf.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">MPI_Accumulate permits the use of pre-defined reduction operations<br>
with user-defined datatypes, provided the user-defined datatypes are<br>
homogeneous. Your use of MPI_MAXLOC with MY_2INT for MPI_Accumulate<br>
is legal in my reading of the standard. It may not be legal for<br>
MPI_Reduce because of the stupid asymmetry (that I believe you have<br>
pointed out in the past) wherein MPI_Reduce (and MPI_Allreduce) cannot<br>
do things that MPI_Accumulate can do w.r.t. built-in MPI_Op with<br>
user-defined MPI_Datatype.<br>
<br>
Perhaps MPI_Accumulate is correct in not generating but providing the<br>
wrong answer for MPI_MAXLOC, which would be a bug of a different<br>
nature.<br></blockquote><div><br></div><div style>Perhaps, but my reading is that the predefined Op is applied to the basic type from which I constructed MY_2INT (i.e., MPI_INT). Since MPI_MAXLOC does not apply to MPI_INT, this would be an error. I wouldn't know how to write precise language specifying the behavior that would lead to MPI_MAXLOC working with MY_2INT.</div>
</div></div></div>