- Remove useless parameters from ompi_ddt_sndrcv()
- Fix up some comments in coll basic component This commit was SVN r4244.
Этот коммит содержится в:
родитель
4f4fb1f0c5
Коммит
70b6d4eeef
@ -316,7 +316,7 @@ OMPI_DECLSPEC int32_t ompi_ddt_set_args( dt_desc_t* pData,
|
||||
int32_t ca, long* a,
|
||||
int32_t cd, ompi_datatype_t** d,int32_t type);
|
||||
OMPI_DECLSPEC int32_t ompi_ddt_sndrcv( void *sbuf, int32_t scount, const ompi_datatype_t* sdtype, void *rbuf,
|
||||
int32_t rcount, const ompi_datatype_t* rdtype, int32_t tag, MPI_Comm comm);
|
||||
int32_t rcount, const ompi_datatype_t* rdtype);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "datatype/datatype.h"
|
||||
#include "communicator/communicator.h"
|
||||
#include "request/request.h"
|
||||
#include "mca/pml/pml.h"
|
||||
|
||||
@ -35,8 +34,8 @@
|
||||
* - communicator
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int ompi_ddt_sndrcv( void *sbuf, int scount, const ompi_datatype_t* sdtype, void *rbuf,
|
||||
int rcount, const ompi_datatype_t* rdtype, int tag, MPI_Comm comm )
|
||||
int ompi_ddt_sndrcv( void *sbuf, int scount, const ompi_datatype_t* sdtype,
|
||||
void *rbuf, int rcount, const ompi_datatype_t* rdtype)
|
||||
{
|
||||
int err;
|
||||
ompi_convertor_t *send_convertor, *recv_convertor;
|
||||
|
@ -26,7 +26,7 @@
|
||||
/*
|
||||
* allgatherv_intra
|
||||
*
|
||||
* Function: - allgather using other MPI collectives
|
||||
* Function: - allgatherv using other MPI collectives
|
||||
* Accepts: - same as MPI_Allgatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
@ -57,7 +57,7 @@ int mca_coll_basic_allgatherv_intra(void *sbuf, int scount,
|
||||
/*
|
||||
* allgatherv_inter
|
||||
*
|
||||
* Function: - allgather using other MPI collectives
|
||||
* Function: - allgatherv using other MPI collectives
|
||||
* Accepts: - same as MPI_Allgatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
|
@ -75,8 +75,7 @@ int mca_coll_basic_alltoall_intra(void *sbuf, int scount,
|
||||
prcv = ((char *) rbuf) + (rank * rcvinc);
|
||||
|
||||
err = ompi_ddt_sndrcv(psnd, scount, sdtype,
|
||||
prcv, rcount, rdtype,
|
||||
MCA_COLL_BASE_TAG_ALLTOALL, comm);
|
||||
prcv, rcount, rdtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
return err;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
/*
|
||||
* alltoallv_intra
|
||||
*
|
||||
* Function: - MPI_Alltoallv for non-ompid RPIs
|
||||
* Function: - MPI_Alltoallv
|
||||
* Accepts: - same as MPI_Alltoallv()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
@ -64,8 +64,7 @@ mca_coll_basic_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
|
||||
if (0 != scounts[rank]) {
|
||||
err = ompi_ddt_sndrcv(psnd, scounts[rank], sdtype,
|
||||
prcv, rcounts[rank], rdtype,
|
||||
MCA_COLL_BASE_TAG_ALLTOALLV, comm);
|
||||
prcv, rcounts[rank], rdtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
return err;
|
||||
}
|
||||
@ -144,7 +143,7 @@ mca_coll_basic_alltoallv_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
/*
|
||||
* alltoallv_inter
|
||||
*
|
||||
* Function: - MPI_Alltoallv for non-lamd RPIs
|
||||
* Function: - MPI_Alltoallv
|
||||
* Accepts: - same as MPI_Alltoallv()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@
|
||||
/*
|
||||
* alltoallw_intra
|
||||
*
|
||||
* Function: - MPI_Alltoallw for non-ompid RPIs
|
||||
* Function: - MPI_Alltoallw
|
||||
* Accepts: - same as MPI_Alltoallw()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
@ -57,8 +57,7 @@ int mca_coll_basic_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
|
||||
if (0 != scounts[rank]) {
|
||||
err = ompi_ddt_sndrcv(psnd, scounts[rank], sdtypes[rank],
|
||||
prcv, rcounts[rank], rdtypes[rank],
|
||||
MCA_COLL_BASE_TAG_ALLTOALLW, comm);
|
||||
prcv, rcounts[rank], rdtypes[rank]);
|
||||
if (MPI_SUCCESS != err) {
|
||||
return err;
|
||||
}
|
||||
@ -135,7 +134,7 @@ int mca_coll_basic_alltoallw_intra(void *sbuf, int *scounts, int *sdisps,
|
||||
/*
|
||||
* alltoallw_inter
|
||||
*
|
||||
* Function: - MPI_Alltoallw for non-lamd RPIs
|
||||
* Function: - MPI_Alltoallw
|
||||
* Accepts: - same as MPI_Alltoallw()
|
||||
* Returns: - MPI_SUCCESS or an MPI error code
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@
|
||||
* exscan_intra
|
||||
*
|
||||
* Function: - basic exscan operation
|
||||
* Accepts: - same arguments as MPI_Exccan()
|
||||
* Accepts: - same arguments as MPI_Exscan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
@ -97,8 +97,7 @@ int mca_coll_basic_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
/* If we're commutative, we can copy my sbuf into the reduction
|
||||
buffer before the receive completes */
|
||||
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, reduce_buffer, count, dtype,
|
||||
MCA_COLL_BASE_TAG_EXSCAN, comm);
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, reduce_buffer, count, dtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
goto error;
|
||||
}
|
||||
@ -128,8 +127,7 @@ int mca_coll_basic_exscan_intra(void *sbuf, void *rbuf, int count,
|
||||
goto error;
|
||||
}
|
||||
|
||||
err = ompi_ddt_sndrcv(rbuf, count, dtype, reduce_buffer, count, dtype,
|
||||
MCA_COLL_BASE_TAG_EXSCAN, comm);
|
||||
err = ompi_ddt_sndrcv(rbuf, count, dtype, reduce_buffer, count, dtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
goto error;
|
||||
}
|
||||
@ -165,7 +163,7 @@ error:
|
||||
* exscan_inter
|
||||
*
|
||||
* Function: - basic exscan operation
|
||||
* Accepts: - same arguments as MPI_Exccan()
|
||||
* Accepts: - same arguments as MPI_Exscan()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_exscan_inter(void *sbuf, void *rbuf, int count,
|
||||
|
@ -69,8 +69,7 @@ int mca_coll_basic_gather_intra(void *sbuf, int scount,
|
||||
|
||||
if (i == rank) {
|
||||
err = ompi_ddt_sndrcv(sbuf, scount, sdtype, ptmp,
|
||||
rcount, rdtype,
|
||||
MCA_COLL_BASE_TAG_GATHER, comm);
|
||||
rcount, rdtype);
|
||||
} else {
|
||||
err = mca_pml.pml_recv(ptmp, rcount, rdtype, i,
|
||||
MCA_COLL_BASE_TAG_GATHER,
|
||||
|
@ -26,7 +26,7 @@
|
||||
* gatherv_intra
|
||||
*
|
||||
* Function: - basic gatherv operation
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Accepts: - same arguments as MPI_Gatherb()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_gatherv_intra(void *sbuf, int scount,
|
||||
@ -80,8 +80,7 @@ int mca_coll_basic_gatherv_intra(void *sbuf, int scount,
|
||||
|
||||
if (i == rank) {
|
||||
err = ompi_ddt_sndrcv(sbuf, scount, sdtype,
|
||||
ptmp, rcounts[i], rdtype,
|
||||
MCA_COLL_BASE_TAG_GATHERV, comm);
|
||||
ptmp, rcounts[i], rdtype);
|
||||
} else {
|
||||
err = mca_pml.pml_recv(ptmp, rcounts[i], rdtype, i,
|
||||
MCA_COLL_BASE_TAG_GATHERV,
|
||||
@ -103,7 +102,7 @@ int mca_coll_basic_gatherv_intra(void *sbuf, int scount,
|
||||
* gatherv_inter
|
||||
*
|
||||
* Function: - basic gatherv operation
|
||||
* Accepts: - same arguments as MPI_Bcast()
|
||||
* Accepts: - same arguments as MPI_Gatherv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_gatherv_inter(void *sbuf, int scount,
|
||||
|
@ -198,8 +198,7 @@ int mca_coll_basic_reduce_lin_intra(void *sbuf, void *rbuf, int count,
|
||||
/* Initialize the receive buffer. */
|
||||
|
||||
if (rank == (size - 1)) {
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, rbuf, count,
|
||||
dtype, MCA_COLL_BASE_TAG_REDUCE, comm);
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, rbuf, count, dtype);
|
||||
} else {
|
||||
err = mca_pml.pml_recv(rbuf, count, dtype, size - 1,
|
||||
MCA_COLL_BASE_TAG_REDUCE, comm, MPI_STATUS_IGNORE);
|
||||
@ -375,8 +374,7 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
|
||||
buffer into a temp buffer (pml_buffer) and then reduce
|
||||
what we just received against it. */
|
||||
if( !ompi_op_is_commute(op) ) {
|
||||
ompi_ddt_sndrcv( sbuf, count, dtype, pml_buffer, count, dtype,
|
||||
MCA_COLL_BASE_TAG_REDUCE, comm);
|
||||
ompi_ddt_sndrcv( sbuf, count, dtype, pml_buffer, count, dtype);
|
||||
ompi_op_reduce( op, rbuf, pml_buffer, count, dtype );
|
||||
} else {
|
||||
ompi_op_reduce(op, sbuf, pml_buffer, count, dtype);
|
||||
@ -394,8 +392,7 @@ int mca_coll_basic_reduce_log_intra(void *sbuf, void *rbuf, int count,
|
||||
err = MPI_SUCCESS;
|
||||
if (0 == vrank) {
|
||||
if (root == rank) {
|
||||
ompi_ddt_sndrcv( snd_buffer, count, dtype,
|
||||
rbuf, count, dtype, MCA_COLL_BASE_TAG_REDUCE, comm);
|
||||
ompi_ddt_sndrcv( snd_buffer, count, dtype, rbuf, count, dtype);
|
||||
} else {
|
||||
err = mca_pml.pml_send( snd_buffer, count,
|
||||
dtype, root, MCA_COLL_BASE_TAG_REDUCE,
|
||||
|
@ -53,7 +53,7 @@ int mca_coll_basic_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
|
||||
if (0 == rank) {
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype,
|
||||
rbuf, count, dtype, MCA_COLL_BASE_TAG_SCAN, comm);
|
||||
rbuf, count, dtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
return err;
|
||||
}
|
||||
@ -79,8 +79,7 @@ int mca_coll_basic_scan_intra(void *sbuf, void *rbuf, int count,
|
||||
|
||||
/* Copy the send buffer into the receive buffer. */
|
||||
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, rbuf,
|
||||
count, dtype, MCA_COLL_BASE_TAG_SCAN, comm);
|
||||
err = ompi_ddt_sndrcv(sbuf, count, dtype, rbuf, count, dtype);
|
||||
if (MPI_SUCCESS != err) {
|
||||
if (NULL != free_buffer) {
|
||||
free(free_buffer);
|
||||
|
@ -72,8 +72,7 @@ int mca_coll_basic_scatter_intra(void *sbuf, int scount,
|
||||
/* simple optimization */
|
||||
|
||||
if (i == rank) {
|
||||
err = ompi_ddt_sndrcv(ptmp, scount, sdtype, rbuf,
|
||||
rcount, rdtype, MCA_COLL_BASE_TAG_SCATTER, comm);
|
||||
err = ompi_ddt_sndrcv(ptmp, scount, sdtype, rbuf, rcount, rdtype);
|
||||
} else {
|
||||
err = mca_pml.pml_send(ptmp, scount, sdtype, i,
|
||||
MCA_COLL_BASE_TAG_SCATTER,
|
||||
|
@ -27,7 +27,7 @@
|
||||
* scatterv_intra
|
||||
*
|
||||
* Function: - scatterv operation
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Accepts: - same arguments as MPI_Scatterv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_scatterv_intra(void *sbuf, int *scounts,
|
||||
@ -75,8 +75,7 @@ int mca_coll_basic_scatterv_intra(void *sbuf, int *scounts,
|
||||
/* simple optimization */
|
||||
|
||||
if (i == rank) {
|
||||
err = ompi_ddt_sndrcv(ptmp, scounts[i], sdtype, rbuf,
|
||||
rcount, rdtype, MCA_COLL_BASE_TAG_SCATTERV, comm);
|
||||
err = ompi_ddt_sndrcv(ptmp, scounts[i], sdtype, rbuf, rcount, rdtype);
|
||||
} else {
|
||||
err = mca_pml.pml_send(ptmp, scounts[i], sdtype, i,
|
||||
MCA_COLL_BASE_TAG_SCATTERV,
|
||||
@ -97,7 +96,7 @@ int mca_coll_basic_scatterv_intra(void *sbuf, int *scounts,
|
||||
* scatterv_inter
|
||||
*
|
||||
* Function: - scatterv operation
|
||||
* Accepts: - same arguments as MPI_Scatter()
|
||||
* Accepts: - same arguments as MPI_Scatterv()
|
||||
* Returns: - MPI_SUCCESS or error code
|
||||
*/
|
||||
int mca_coll_basic_scatterv_inter(void *sbuf, int *scounts,
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user