1
1

Implement the send receive as 2 non blocking operations. That will help us

avoiding too many calls to opal_progress.

This commit was SVN r12553.
Этот коммит содержится в:
George Bosilca 2006-11-10 23:06:19 +00:00
родитель c2c6a1b37e
Коммит ec410644ce

Просмотреть файл

@ -67,29 +67,29 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount, ompi_datatype_t*
* 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, ompi_datatype_t* sdatatype, 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) */
int err, line = 0;
ompi_request_t* req;
ompi_status_public_t tmpstatus;
ompi_request_t* req[2];
ompi_status_public_t tmpstatus[2];
/* post new irecv */
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, comm, &req));
err = MCA_PML_CALL(irecv( recvbuf, rcount, rdatatype, source, rtag, comm, &(req[0])));
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
/* send data to children */
err = MCA_PML_CALL(send( sendbuf, scount, sdatatype, dest, stag, MCA_PML_BASE_SEND_SYNCHRONOUS, comm));
err = MCA_PML_CALL(isend( sendbuf, scount, sdatatype, dest, stag,
MCA_PML_BASE_SEND_SYNCHRONOUS, comm, &(req[1])));
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
err = ompi_request_wait( &req, &tmpstatus );
err = ompi_request_wait_all( 2, req, tmpstatus );
if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
if (MPI_STATUS_IGNORE!=status) {
*status = tmpstatus;
*status = tmpstatus[0];
}
return (MPI_SUCCESS);