[mpich-discuss] MPI_Accumulate with MAXLOC does not error for incompatible types
Jed Brown
jedbrown at mcs.anl.gov
Tue Jan 1 13:09:49 CST 2013
With MPI_Reduce, we get a nice helpful error message:
Fatal error in PMPI_Reduce: Invalid MPI_Op, error stack:
PMPI_Reduce(1217)...........: MPI_Reduce(sbuf=0x7fff3e39fa50,
rbuf=0x7fff3e39fa40, count=1, dtype=USER<contig>, MPI_MAXLOC, root=0,
MPI_COMM_WORLD) failed
MPIR_MAXLOC_check_dtype(151): MPI_Op MPI_MAXLOC operation not defined for
this datatype
With MPI_Accumulate, we just get wrong results. See attached code using a
user-defined contiguous results.
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.
[1] As usual, the crud would evaporate if only MPI_Accumulate were
extensible over datatypes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130101/90616c1d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maxloc.c
Type: text/x-csrc
Size: 1377 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20130101/90616c1d/attachment.bin>
More information about the discuss
mailing list