1
1

Make sure to copy the right amount out of the temp buffer.

This commit was SVN r7400.
Этот коммит содержится в:
Jeff Squyres 2005-09-15 22:06:36 +00:00
родитель 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),
rdtype, 0, comm);
} }
err = comm->c_coll.coll_bcast(rbuf, rcount * ompi_comm_size(comm), /* If we've got a temp buffer, copy back out */
rdtype, 0, comm);
if (MPI_SUCCESS != err) {
return err;
}
/* If we're IN_PLACE and not the root, copy back out (sendcount if (MPI_SUCCESS == err && NULL != inplace_temp) {
and sendtype are ignored) */ ompi_ddt_copy_content_same_ddt(rdtype, rcount * ompi_comm_size(comm),
rbuf_original, rbuf);
if (NULL != inplace_temp) {
ompi_ddt_copy_content_same_ddt(rdtype, rcount, rbuf_original, rbuf);
free(inplace_temp); free(inplace_temp);
} }
/* All done */ /* All done */
return MPI_SUCCESS; return err;
} }