MPI_Accumulate permits the use of pre-defined reduction operations
with user-defined datatypes, provided the user-defined datatypes are
homogeneous. Your use of MPI_MAXLOC with MY_2INT for MPI_Accumulate
is legal in my reading of the standard. It may not be legal for
MPI_Reduce because of the stupid asymmetry (that I believe you have
pointed out in the past) wherein MPI_Reduce (and MPI_Allreduce) cannot
do things that MPI_Accumulate can do w.r.t. built-in MPI_Op with
user-defined MPI_Datatype.
Perhaps MPI_Accumulate is correct in not generating but providing the
wrong answer for MPI_MAXLOC, which would be a bug of a different
nature.