<div dir="ltr"><div>With MPI_Reduce, we get a nice helpful error message:<br><br>Fatal error in PMPI_Reduce: Invalid MPI_Op, error stack:</div><div>PMPI_Reduce(1217)...........: MPI_Reduce(sbuf=0x7fff3e39fa50, rbuf=0x7fff3e39fa40, count=1, dtype=USER<contig>, MPI_MAXLOC, root=0, MPI_COMM_WORLD) failed</div>
<div>MPIR_MAXLOC_check_dtype(151): MPI_Op MPI_MAXLOC operation not defined for this datatype </div><div><br><br>With MPI_Accumulate, we just get wrong results. See attached code using a user-defined contiguous results.<br>
<br>I care about this because I'm stuck [1] dispatching into alternative mechanisms for type combinations that are not directly supported by MPI (e.g., struct {int u; long long k;} and __float128). I missed a spot and had a confusing bug that I think MPICH should be catching.<br>
<br><br>[1] As usual, the crud would evaporate if only MPI_Accumulate were extensible over datatypes.</div></div>