1
1

MPI-2 7.3.3 description of MPI_Allgatherv is wrong -- can't just have

all processes call MPI_Gatherv(MPI_IN_PLACE...) because IN_PLACE is
only allowed to be used at the root.  Non-root processes must use
their receive buf as the send buf.

This commit was SVN r7363.
Этот коммит содержится в:
Jeff Squyres 2005-09-14 02:21:33 +00:00
родитель b3db6fc2d1
Коммит 0fcd682c4c

Просмотреть файл

@ -47,9 +47,20 @@ mca_coll_basic_allgatherv_intra(void *sbuf, int scount,
rank = ompi_comm_rank(comm); rank = ompi_comm_rank(comm);
for (i = 0; i < size; ++i) { for (i = 0; i < size; ++i) {
if (MPI_IN_PLACE == sbuf) { if (MPI_IN_PLACE == sbuf) {
err = comm->c_coll.coll_gatherv(MPI_IN_PLACE, 0, /* MPI-2 7.3.3 description of MPI_Allgatherv is wrong --
MPI_DATATYPE_NULL, rbuf, can't just have all processes call
rcounts, disps, rdtype, i, comm); MPI_Gatherv(MPI_IN_PLACE...) because IN_PLACE is only
allowed to be used at the root. Non-root processes
must use their receive buf as the send buf. */
if (i == rank) {
err = comm->c_coll.coll_gatherv(MPI_IN_PLACE, -1,
MPI_DATATYPE_NULL, rbuf,
rcounts, disps, rdtype, i, comm);
} else {
err = comm->c_coll.coll_gatherv(rbuf, rcounts[i], rdtype,
NULL, NULL, NULL, MPI_DATATYPE_NULL,
i, comm);
}
} else { } else {
err = comm->c_coll.coll_gatherv(sbuf, scount, sdtype, rbuf, err = comm->c_coll.coll_gatherv(sbuf, scount, sdtype, rbuf,
rcounts, disps, rdtype, i, comm); rcounts, disps, rdtype, i, comm);