Minor changes to allgather implementation with some clean-up of util code.
- in allgather algorithms I replaces irecv-isend-waitall sequence with call to ompi_coll_tuned_sendrecv - most of the functions in util code and allgather decision function conform to 80 character line width. - This commit was SVN r13069.
Этот коммит содержится в:
родитель
93208445fd
Коммит
ccc3ee0b6b
@ -91,7 +91,6 @@ int ompi_coll_tuned_allgather_intra_bruck(void *sbuf, int scount,
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
ptrdiff_t slb, rlb, sext, rext;
|
ptrdiff_t slb, rlb, sext, rext;
|
||||||
char *tmpsend = NULL, *tmprecv = NULL;
|
char *tmpsend = NULL, *tmprecv = NULL;
|
||||||
ompi_request_t *reqs[2] = {NULL, NULL};
|
|
||||||
|
|
||||||
size = ompi_comm_size(comm);
|
size = ompi_comm_size(comm);
|
||||||
rank = ompi_comm_rank(comm);
|
rank = ompi_comm_rank(comm);
|
||||||
@ -148,17 +147,11 @@ int ompi_coll_tuned_allgather_intra_bruck(void *sbuf, int scount,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sendreceive */
|
/* Sendreceive */
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, blockcount * rcount, rdtype,
|
err = ompi_coll_tuned_sendrecv(tmpsend, blockcount * rcount, rdtype,
|
||||||
recvfrom, MCA_COLL_BASE_TAG_ALLGATHER,
|
sendto, MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
comm, &reqs[0]));
|
tmprecv, blockcount * rcount, rdtype,
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
recvfrom, MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
err = MCA_PML_CALL(isend(tmpsend, blockcount * rcount, rdtype,
|
|
||||||
sendto, MCA_COLL_BASE_TAG_ALLGATHER,
|
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -273,7 +266,6 @@ ompi_coll_tuned_allgather_intra_recursivedoubling(void *sbuf, int scount,
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
ptrdiff_t slb, rlb, sext, rext;
|
ptrdiff_t slb, rlb, sext, rext;
|
||||||
char *tmpsend = NULL, *tmprecv = NULL;
|
char *tmpsend = NULL, *tmprecv = NULL;
|
||||||
ompi_request_t *reqs[2] = {NULL, NULL};
|
|
||||||
|
|
||||||
size = ompi_comm_size(comm);
|
size = ompi_comm_size(comm);
|
||||||
rank = ompi_comm_rank(comm);
|
rank = ompi_comm_rank(comm);
|
||||||
@ -335,17 +327,11 @@ ompi_coll_tuned_allgather_intra_recursivedoubling(void *sbuf, int scount,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sendreceive */
|
/* Sendreceive */
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, distance * rcount, rdtype,
|
err = ompi_coll_tuned_sendrecv(tmpsend, distance * rcount, rdtype,
|
||||||
remote, MCA_COLL_BASE_TAG_ALLGATHER,
|
remote, MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
comm, &reqs[0]));
|
tmprecv, distance * rcount, rdtype,
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
remote, MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
err = MCA_PML_CALL(isend(tmpsend, distance * rcount, rdtype,
|
|
||||||
remote, MCA_COLL_BASE_TAG_ALLGATHER,
|
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -387,7 +373,6 @@ int ompi_coll_tuned_allgather_intra_ring(void *sbuf, int scount,
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
ptrdiff_t slb, rlb, sext, rext;
|
ptrdiff_t slb, rlb, sext, rext;
|
||||||
char *tmpsend = NULL, *tmprecv = NULL;
|
char *tmpsend = NULL, *tmprecv = NULL;
|
||||||
ompi_request_t *reqs[2] = {NULL, NULL};
|
|
||||||
|
|
||||||
size = ompi_comm_size(comm);
|
size = ompi_comm_size(comm);
|
||||||
rank = ompi_comm_rank(comm);
|
rank = ompi_comm_rank(comm);
|
||||||
@ -431,17 +416,11 @@ int ompi_coll_tuned_allgather_intra_ring(void *sbuf, int scount,
|
|||||||
tmpsend = (char*)rbuf + senddatafrom * rcount * rext;
|
tmpsend = (char*)rbuf + senddatafrom * rcount * rext;
|
||||||
|
|
||||||
/* Sendreceive */
|
/* Sendreceive */
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, rcount, rdtype,
|
err = ompi_coll_tuned_sendrecv(tmpsend, rcount, rdtype, sendto,
|
||||||
recvfrom, MCA_COLL_BASE_TAG_ALLGATHER,
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
comm, &reqs[0]));
|
tmprecv, rcount, rdtype, recvfrom,
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
err = MCA_PML_CALL(isend(tmpsend, rcount, rdtype,
|
|
||||||
sendto, MCA_COLL_BASE_TAG_ALLGATHER,
|
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -525,7 +504,6 @@ ompi_coll_tuned_allgather_intra_neighborexchange(void *sbuf, int scount,
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
ptrdiff_t slb, rlb, sext, rext;
|
ptrdiff_t slb, rlb, sext, rext;
|
||||||
char *tmpsend = NULL, *tmprecv = NULL;
|
char *tmpsend = NULL, *tmprecv = NULL;
|
||||||
ompi_request_t *reqs[2] = {NULL, NULL};
|
|
||||||
|
|
||||||
size = ompi_comm_size(comm);
|
size = ompi_comm_size(comm);
|
||||||
rank = ompi_comm_rank(comm);
|
rank = ompi_comm_rank(comm);
|
||||||
@ -587,15 +565,11 @@ ompi_coll_tuned_allgather_intra_neighborexchange(void *sbuf, int scount,
|
|||||||
tmprecv = (char*)rbuf + neighbor[0] * rcount * rext;
|
tmprecv = (char*)rbuf + neighbor[0] * rcount * rext;
|
||||||
tmpsend = (char*)rbuf + rank * rcount * rext;
|
tmpsend = (char*)rbuf + rank * rcount * rext;
|
||||||
/* Sendreceive */
|
/* Sendreceive */
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, rcount, rdtype,
|
err = ompi_coll_tuned_sendrecv(tmpsend, rcount, rdtype, neighbor[0],
|
||||||
neighbor[0], MCA_COLL_BASE_TAG_ALLGATHER,
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
comm, &reqs[0]));
|
tmprecv, rcount, rdtype, neighbor[0],
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
err = MCA_PML_CALL(isend(tmpsend, rcount, rdtype,
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
neighbor[0], MCA_COLL_BASE_TAG_ALLGATHER,
|
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
/* Determine initial sending location */
|
/* Determine initial sending location */
|
||||||
@ -614,15 +588,13 @@ ompi_coll_tuned_allgather_intra_neighborexchange(void *sbuf, int scount,
|
|||||||
tmpsend = (char*)rbuf + send_data_from * rcount * rext;
|
tmpsend = (char*)rbuf + send_data_from * rcount * rext;
|
||||||
|
|
||||||
/* Sendreceive */
|
/* Sendreceive */
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, 2 * rcount, rdtype,
|
err = ompi_coll_tuned_sendrecv(tmpsend, 2 * rcount, rdtype,
|
||||||
neighbor[i_parity], MCA_COLL_BASE_TAG_ALLGATHER,
|
neighbor[i_parity],
|
||||||
comm, &reqs[0]));
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
tmprecv, 2 * rcount, rdtype,
|
||||||
err = MCA_PML_CALL(isend(tmpsend, 2 * rcount, rdtype,
|
neighbor[i_parity],
|
||||||
neighbor[i_parity], MCA_COLL_BASE_TAG_ALLGATHER,
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
send_data_from = recv_data_from[i_parity];
|
send_data_from = recv_data_from[i_parity];
|
||||||
@ -648,7 +620,6 @@ int ompi_coll_tuned_allgather_intra_two_procs(void *sbuf, int scount,
|
|||||||
int remote;
|
int remote;
|
||||||
char *tmpsend = NULL, *tmprecv = NULL;
|
char *tmpsend = NULL, *tmprecv = NULL;
|
||||||
ptrdiff_t sext, rext, lb;
|
ptrdiff_t sext, rext, lb;
|
||||||
ompi_request_t *reqs[2] = {NULL, NULL};
|
|
||||||
|
|
||||||
rank = ompi_comm_rank(comm);
|
rank = ompi_comm_rank(comm);
|
||||||
|
|
||||||
@ -673,16 +644,11 @@ int ompi_coll_tuned_allgather_intra_two_procs(void *sbuf, int scount,
|
|||||||
}
|
}
|
||||||
tmprecv = (char*)rbuf + remote * rcount * rext;
|
tmprecv = (char*)rbuf + remote * rcount * rext;
|
||||||
|
|
||||||
err = MCA_PML_CALL(irecv(tmprecv, rcount, rdtype, remote,
|
err = ompi_coll_tuned_sendrecv(tmpsend, scount, sdtype, remote,
|
||||||
MCA_COLL_BASE_TAG_ALLGATHER, comm, &reqs[0]));
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
tmprecv, rcount, rdtype, remote,
|
||||||
|
MCA_COLL_BASE_TAG_ALLGATHER,
|
||||||
err = MCA_PML_CALL(isend(tmpsend, scount, sdtype, remote,
|
comm, MPI_STATUS_IGNORE, rank);
|
||||||
MCA_COLL_BASE_TAG_ALLGATHER,
|
|
||||||
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
|
||||||
|
|
||||||
err = ompi_request_wait_all(2, reqs, MPI_STATUSES_IGNORE);
|
|
||||||
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
|
||||||
|
|
||||||
/* Place your data in correct location if necessary */
|
/* Place your data in correct location if necessary */
|
||||||
|
@ -407,9 +407,10 @@ int ompi_coll_tuned_allgather_intra_dec_fixed(void *sbuf, int scount,
|
|||||||
/* Decision based on MX 2Gb results from Grig cluster at
|
/* Decision based on MX 2Gb results from Grig cluster at
|
||||||
The University of Tennesse, Knoxville
|
The University of Tennesse, Knoxville
|
||||||
- if total message size is less than 50KB use either bruck or
|
- if total message size is less than 50KB use either bruck or
|
||||||
recursive doubling for non-power of two and power of two nodes, respectively.
|
recursive doubling for non-power of two and power of two nodes,
|
||||||
- else use ring and neighbor exchange algorithms for odd and even number of
|
respectively.
|
||||||
nodes, respectively.
|
- else use ring and neighbor exchange algorithms for odd and even
|
||||||
|
number of nodes, respectively.
|
||||||
*/
|
*/
|
||||||
if (total_dsize < 50000) {
|
if (total_dsize < 50000) {
|
||||||
if (pow2_size == communicator_size) {
|
if (pow2_size == communicator_size) {
|
||||||
@ -419,12 +420,14 @@ int ompi_coll_tuned_allgather_intra_dec_fixed(void *sbuf, int scount,
|
|||||||
rdtype, comm);
|
rdtype, comm);
|
||||||
} else {
|
} else {
|
||||||
return ompi_coll_tuned_allgather_intra_bruck(sbuf, scount, sdtype,
|
return ompi_coll_tuned_allgather_intra_bruck(sbuf, scount, sdtype,
|
||||||
rbuf, rcount, rdtype, comm);
|
rbuf, rcount, rdtype,
|
||||||
|
comm);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (communicator_size % 2) {
|
if (communicator_size % 2) {
|
||||||
return ompi_coll_tuned_allgather_intra_ring(sbuf, scount, sdtype,
|
return ompi_coll_tuned_allgather_intra_ring(sbuf, scount, sdtype,
|
||||||
rbuf, rcount, rdtype, comm);
|
rbuf, rcount, rdtype,
|
||||||
|
comm);
|
||||||
} else {
|
} else {
|
||||||
return ompi_coll_tuned_allgather_intra_neighborexchange(sbuf, scount,
|
return ompi_coll_tuned_allgather_intra_neighborexchange(sbuf, scount,
|
||||||
sdtype,
|
sdtype,
|
||||||
@ -444,8 +447,10 @@ int ompi_coll_tuned_allgather_intra_dec_fixed(void *sbuf, int scount,
|
|||||||
- for everything else use ring.
|
- for everything else use ring.
|
||||||
*/
|
*/
|
||||||
if ((pow2_size == communicator_size) && (total_dsize < 524288)) {
|
if ((pow2_size == communicator_size) && (total_dsize < 524288)) {
|
||||||
return ompi_coll_tuned_allgather_intra_recursivedoubling(sbuf, scount, sdtype,
|
return ompi_coll_tuned_allgather_intra_recursivedoubling(sbuf, scount,
|
||||||
rbuf, rcount, rdtype,
|
sdtype,
|
||||||
|
rbuf, rcount,
|
||||||
|
rdtype,
|
||||||
comm);
|
comm);
|
||||||
} else if (total_dsize <= 81920) {
|
} else if (total_dsize <= 81920) {
|
||||||
return ompi_coll_tuned_allgather_intra_bruck(sbuf, scount, sdtype,
|
return ompi_coll_tuned_allgather_intra_bruck(sbuf, scount, sdtype,
|
||||||
|
@ -28,9 +28,11 @@
|
|||||||
#include "ompi/mca/pml/pml.h"
|
#include "ompi/mca/pml/pml.h"
|
||||||
#include "coll_tuned_util.h"
|
#include "coll_tuned_util.h"
|
||||||
|
|
||||||
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
||||||
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
void* recvbuf, int rcount,
|
||||||
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
ompi_status_public_t* status )
|
ompi_status_public_t* status )
|
||||||
@ -41,11 +43,13 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t*
|
|||||||
ompi_status_public_t statuses[2];
|
ompi_status_public_t statuses[2];
|
||||||
|
|
||||||
/* post new irecv */
|
/* post new irecv */
|
||||||
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, comm, &reqs[0]));
|
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag,
|
||||||
|
comm, &reqs[0]));
|
||||||
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
||||||
|
|
||||||
/* send data to children */
|
/* send data to children */
|
||||||
err = MCA_PML_CALL(isend( sendbuf, scount, sdatatype, dest, stag, MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
err = MCA_PML_CALL(isend( sendbuf, scount, sdatatype, dest, stag,
|
||||||
|
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[1]));
|
||||||
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
||||||
|
|
||||||
err = ompi_request_wait_all( 2, reqs, statuses );
|
err = ompi_request_wait_all( 2, reqs, statuses );
|
||||||
@ -58,18 +62,25 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t*
|
|||||||
return (MPI_SUCCESS);
|
return (MPI_SUCCESS);
|
||||||
|
|
||||||
error_handler:
|
error_handler:
|
||||||
OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",__FILE__,line,err));
|
OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",
|
||||||
|
__FILE__,line,err));
|
||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* localcompleted version that makes sure the send has completed locally
|
* localcompleted version that makes sure the send has completed locally
|
||||||
* Currently this is a sync call, but will change to locally completed version when available
|
* Currently this is a sync call, but will change to locally completed
|
||||||
|
* version when available
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount, ompi_datatype_t* sdatatype, int dest, int stag,
|
int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype, int source, int rtag,
|
ompi_datatype_t* sdatatype,
|
||||||
struct ompi_communicator_t* comm, ompi_status_public_t* status )
|
int dest, int stag,
|
||||||
|
void* recvbuf, int rcount,
|
||||||
|
ompi_datatype_t* rdatatype,
|
||||||
|
int source, int rtag,
|
||||||
|
struct ompi_communicator_t* comm,
|
||||||
|
ompi_status_public_t* status )
|
||||||
|
|
||||||
{ /* post receive first, then [local] sync send, then wait... should be fast (I hope) */
|
{ /* post receive first, then [local] sync send, then wait... should be fast (I hope) */
|
||||||
int err, line = 0;
|
int err, line = 0;
|
||||||
@ -77,7 +88,8 @@ int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount, o
|
|||||||
ompi_status_public_t tmpstatus[2];
|
ompi_status_public_t tmpstatus[2];
|
||||||
|
|
||||||
/* post new irecv */
|
/* post new irecv */
|
||||||
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, comm, &(req[0])));
|
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag,
|
||||||
|
comm, &(req[0])));
|
||||||
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
|
||||||
|
|
||||||
/* send data to children */
|
/* send data to children */
|
||||||
@ -98,4 +110,3 @@ int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount, o
|
|||||||
OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",__FILE__,line,err));
|
OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",__FILE__,line,err));
|
||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,9 +33,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
||||||
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
void* recvbuf, int rcount,
|
||||||
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
ompi_status_public_t* status );
|
ompi_status_public_t* status );
|
||||||
@ -43,42 +45,58 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t*
|
|||||||
|
|
||||||
/* inline functions */
|
/* inline functions */
|
||||||
|
|
||||||
static inline int ompi_coll_tuned_sendrecv( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
static inline int
|
||||||
int dest, int stag,
|
ompi_coll_tuned_sendrecv( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
int dest, int stag,
|
||||||
int source, int rtag,
|
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
||||||
struct ompi_communicator_t* comm,
|
int source, int rtag,
|
||||||
ompi_status_public_t* status, int myid )
|
struct ompi_communicator_t* comm,
|
||||||
|
ompi_status_public_t* status, int myid )
|
||||||
{
|
{
|
||||||
if ((dest==myid)&&(source==myid)) {
|
if ((dest == myid) && (source == myid)) {
|
||||||
return (int) ompi_ddt_sndrcv(sendbuf, (int32_t) scount, sdatatype, recvbuf, (int32_t) rcount, rdatatype);
|
return (int) ompi_ddt_sndrcv(sendbuf, (int32_t) scount, sdatatype,
|
||||||
|
recvbuf, (int32_t) rcount, rdatatype);
|
||||||
}
|
}
|
||||||
return ompi_coll_tuned_sendrecv_actual (sendbuf, scount, sdatatype, dest, stag, recvbuf, rcount, rdatatype,
|
return ompi_coll_tuned_sendrecv_actual (sendbuf, scount, sdatatype,
|
||||||
|
dest, stag,
|
||||||
|
recvbuf, rcount, rdatatype,
|
||||||
source, rtag, comm, status);
|
source, rtag, comm, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
int
|
||||||
int dest, int stag,
|
ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int source, int rtag,
|
int dest, int stag,
|
||||||
struct ompi_communicator_t* comm,
|
void* recvbuf, int rcount,
|
||||||
ompi_status_public_t* status );
|
ompi_datatype_t* rdatatype,
|
||||||
|
int source, int rtag,
|
||||||
|
struct ompi_communicator_t* comm,
|
||||||
|
ompi_status_public_t* status );
|
||||||
|
|
||||||
|
|
||||||
/* inline functions */
|
/* inline functions */
|
||||||
|
|
||||||
static inline int ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
static inline int
|
||||||
int dest, int stag,
|
ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, int scount,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int source, int rtag,
|
int dest, int stag,
|
||||||
struct ompi_communicator_t* comm,
|
void* recvbuf, int rcount,
|
||||||
ompi_status_public_t* status, int myid )
|
ompi_datatype_t* rdatatype,
|
||||||
|
int source, int rtag,
|
||||||
|
struct ompi_communicator_t* comm,
|
||||||
|
ompi_status_public_t* status, int myid )
|
||||||
{
|
{
|
||||||
if ((dest==myid)&&(source==myid)) {
|
if ((dest == myid) && (source == myid)) {
|
||||||
return (int) ompi_ddt_sndrcv(sendbuf, (int32_t) scount, sdatatype, recvbuf, (int32_t) rcount, rdatatype);
|
return (int) ompi_ddt_sndrcv(sendbuf, (int32_t) scount, sdatatype,
|
||||||
|
recvbuf, (int32_t) rcount, rdatatype);
|
||||||
}
|
}
|
||||||
return ompi_coll_tuned_sendrecv_actual_localcompleted (sendbuf, scount, sdatatype, dest, stag, recvbuf, rcount, rdatatype,
|
return ompi_coll_tuned_sendrecv_actual_localcompleted (sendbuf, scount,
|
||||||
source, rtag, comm, status);
|
sdatatype, dest,
|
||||||
|
stag,
|
||||||
|
recvbuf, rcount,
|
||||||
|
rdatatype,
|
||||||
|
source, rtag, comm,
|
||||||
|
status);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(c_plusplus) || defined(__cplusplus)
|
#if defined(c_plusplus) || defined(__cplusplus)
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user