Make sure to copy the right amount out of the temp buffer.
This commit was SVN r7400.
Этот коммит содержится в:
родитель
f4e8fe4817
Коммит
10d02b2110
@ -65,34 +65,28 @@ mca_coll_basic_allgather_intra(void *sbuf, int scount,
|
|||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
rbuf = inplace_temp - lb;
|
rbuf = inplace_temp - lb;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Gather and broadcast. */
|
/* Gather and broadcast. */
|
||||||
|
|
||||||
err = comm->c_coll.coll_gather(sbuf, scount, sdtype, rbuf, rcount,
|
err = comm->c_coll.coll_gather(sbuf, scount, sdtype, rbuf, rcount,
|
||||||
rdtype, 0, comm);
|
rdtype, 0, comm);
|
||||||
if (MPI_SUCCESS != err) {
|
if (MPI_SUCCESS == err) {
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = comm->c_coll.coll_bcast(rbuf, rcount * ompi_comm_size(comm),
|
err = comm->c_coll.coll_bcast(rbuf, rcount * ompi_comm_size(comm),
|
||||||
rdtype, 0, comm);
|
rdtype, 0, comm);
|
||||||
if (MPI_SUCCESS != err) {
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're IN_PLACE and not the root, copy back out (sendcount
|
/* If we've got a temp buffer, copy back out */
|
||||||
and sendtype are ignored) */
|
|
||||||
|
|
||||||
if (NULL != inplace_temp) {
|
if (MPI_SUCCESS == err && NULL != inplace_temp) {
|
||||||
ompi_ddt_copy_content_same_ddt(rdtype, rcount, rbuf_original, rbuf);
|
ompi_ddt_copy_content_same_ddt(rdtype, rcount * ompi_comm_size(comm),
|
||||||
|
rbuf_original, rbuf);
|
||||||
free(inplace_temp);
|
free(inplace_temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All done */
|
/* All done */
|
||||||
|
|
||||||
return MPI_SUCCESS;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user