Add support for MPI_IN_PLACE for the easy operations.
This commit was SVN r7344.
Этот коммит содержится в:
родитель
ad647b105d
Коммит
da87169d17
@ -48,8 +48,9 @@ mca_coll_basic_allgather_intra(void *sbuf, int scount,
|
||||
|
||||
err = comm->c_coll.coll_gather(sbuf, scount, sdtype, rbuf, rcount,
|
||||
rdtype, 0, comm);
|
||||
if (MPI_SUCCESS != err)
|
||||
if (MPI_SUCCESS != err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
err = comm->c_coll.coll_bcast(rbuf, rcount * size, rdtype, 0, comm);
|
||||
return err;
|
||||
|
@ -71,8 +71,10 @@ mca_coll_basic_gather_intra(void *sbuf, int scount,
|
||||
/* simple optimization */
|
||||
|
||||
if (i == rank) {
|
||||
if (MPI_IN_PLACE != sbuf) {
|
||||
err = ompi_ddt_sndrcv(sbuf, scount, sdtype, ptmp,
|
||||
rcount, rdtype);
|
||||
}
|
||||
} else {
|
||||
err = MCA_PML_CALL(recv(ptmp, rcount, rdtype, i,
|
||||
MCA_COLL_BASE_TAG_GATHER,
|
||||
|
@ -76,9 +76,10 @@ mca_coll_basic_gatherv_intra(void *sbuf, int scount,
|
||||
|
||||
if (i == rank) {
|
||||
/* simple optimization */
|
||||
if ((0 < scount) && (0 < rcounts[i]))
|
||||
if (MPI_IN_PLACE != sbuf && (0 < scount) && (0 < rcounts[i])) {
|
||||
err = ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
ptmp, rcounts[i], rdtype);
|
||||
}
|
||||
} else {
|
||||
/* Only receive if there is something to receive */
|
||||
if (rcounts[i] > 0) {
|
||||
|
@ -75,9 +75,11 @@ mca_coll_basic_scatter_intra(void *sbuf, int scount,
|
||||
/* simple optimization */
|
||||
|
||||
if (i == rank) {
|
||||
if (MPI_IN_PLACE != recvbuf) {
|
||||
err =
|
||||
ompi_ddt_sndrcv(ptmp, scount, sdtype, rbuf, rcount,
|
||||
rdtype);
|
||||
}
|
||||
} else {
|
||||
err = MCA_PML_CALL(send(ptmp, scount, sdtype, i,
|
||||
MCA_COLL_BASE_TAG_SCATTER,
|
||||
|
@ -79,11 +79,10 @@ mca_coll_basic_scatterv_intra(void *sbuf, int *scounts,
|
||||
|
||||
if (i == rank) {
|
||||
/* simple optimization or a local operation */
|
||||
if (0 == scounts[i]) {
|
||||
continue;
|
||||
}
|
||||
if (scounts[i] > 0 && MPI_IN_PLACE != rbuf) {
|
||||
err = ompi_ddt_sndrcv(ptmp, scounts[i], sdtype, rbuf, rcount,
|
||||
rdtype);
|
||||
}
|
||||
} else {
|
||||
/* Only send if there is something to send */
|
||||
if (scounts[i] > 0) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user