Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] [patch] MPI_IN_PLACE for MPI_ALLTOALL(V|W)
From: Kawashima, Takahiro (t-kawashima_at_[hidden])
Date: 2013-09-17 01:36:57


Hi,

My colleague tested MPI_IN_PLACE for MPI_ALLTOALL, MPI_ALLTOALLV,
and MPI_ALLTOALLW, which was implemented two months ago in Open MPI
trunk. And he found three bugs and created a patch.

Found bugs are:

(A) Missing MPI_IN_PLACE support in self COLL component

    The attached alltoall-self-inplace.c fails with MPI_ERR_ARG.
    self COLL component also must support MPI_IN_PLACE.

(B) Incorrect rcount[] index

    A trivial bug in the following code.

    for (i = 0, max_size = 0 ; i < size ; ++i) {
        size_t size = ext * rcounts[rank]; // should be rcounts[i]

        max_size = size > max_size ? size : max_size;
    }

    This causes SEGV or something.

(C) For MPI_ALLTOALLV, the unit of displacements is extent, not byte

    Though the unit of displacements is byte for MPI_ALLTOALLW,
    the unit of displacements is extent for MPI_ALLTOALLV.

    MPI-2.2 (page 171) says:

      The outcome is as if each process sent a message to every
      other process with,
        MPI_Send(sendbuf + sdispls[i] · extent(sendtype),
                 sendcounts[i], sendtype, i, ...),
      and received a message from every other process with a call to
        MPI_Recv(recvbuf + rdispls[i] · extent(recvtype),
                 recvcounts[i], recvtype, i, ...).

I attached his patch (alltoall-inplace.patch) to fix these three bugs.

Takahiro Kawashima,
MPI development team,
Fujitsu