AMPI #1639: correct MPI_IN_PLACE handling in collective routines31/2831/19
commitc09258e7ef44ad30074d0bd12d4ecd9c9340ca66
authorSam White <white67@illinois.edu>
Thu, 20 Jul 2017 21:46:04 +0000 (20 16:46 -0500)
committerSam White <white67@illinois.edu>
Mon, 21 Aug 2017 12:50:18 +0000 (21 07:50 -0500)
tree02814c411f051e2d97c549d449fadc0cbd0dc103
parent0ea4630e065d961c5344c8177adf2cb381e96019
AMPI #1639: correct MPI_IN_PLACE handling in collective routines

handle_MPI_IN_PLACE() sets sendbuf equal to recvbuf if sendbuf is
MPI_IN_PLACE. For collective routines, we also need to set the
sendcount, sendtype, and send displacements to their recv counterparts.

For the gather routines, extra care must be taken to set the sendbuf
to the correct displacement in the recvbuf. For the alltoall routines,
all send count/type/displ info must be changed too.

Also avoid error reporting false positives, and add early return to
copyDatatype to avoid copying in place.

Change-Id: Idf46a78a3ba4e38ece99c872bfd9316b966e7d01
src/libs/ck-libs/ampi/ampi.C