Updates:
- Handle MPI_IN_PLACE - Use ompi_ddt_copy_content_same_ddt() where relevant This commit was SVN r7349.
Этот коммит содержится в:
родитель
15f5294da4
Коммит
7c09923751
@ -33,6 +33,10 @@ int mca_coll_self_allgather_intra(void *sbuf, int scount,
|
||||
int rcount, struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ int mca_coll_self_allgatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,9 @@ int mca_coll_self_allreduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_copy_content_same_ddt(dtype, count, rbuf, sbuf);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ int mca_coll_self_gather_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ int mca_coll_self_gatherv_intra(void *sbuf, int scount,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
((char *) rbuf) + disps[0], rcounts[0], rdtype);
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,9 @@ int mca_coll_self_reduce_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
int root, struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_copy_content_same_ddt(dtype, count, rbuf, sbuf);
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,9 @@ int mca_coll_self_reduce_scatter_intra(void *sbuf, void *rbuf, int *rcounts,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, rcounts[0], dtype,
|
||||
rbuf, rcounts[0], dtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_copy_content_same_ddt(dtype, rcounts[0], rbuf, sbuf);
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,9 @@ int mca_coll_self_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
struct ompi_op_t *op,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_copy_content_same_ddt(dtype, count, rbuf, sbuf);
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,10 @@ int mca_coll_self_scatter_intra(void *sbuf, int scount,
|
||||
int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ int mca_coll_self_scatterv_intra(void *sbuf, int *scounts,
|
||||
struct ompi_datatype_t *rdtype, int root,
|
||||
struct ompi_communicator_t *comm)
|
||||
{
|
||||
return ompi_ddt_sndrcv(((char *) sbuf) + disps[0], scounts[0], sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
if (MPI_IN_PLACE == sbuf) {
|
||||
return MPI_SUCCESS;
|
||||
} else {
|
||||
return ompi_ddt_sndrcv(((char *) sbuf) + disps[0], scounts[0], sdtype,
|
||||
rbuf, rcount, rdtype);
|
||||
}
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user