From 52c616025256d2f6322624325af462cf9d10a191 Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Thu, 18 Oct 2007 14:20:24 +0000 Subject: [PATCH] MCA_PML_BASE_REQUEST_MPI_COMPLETE() macro does nothing except call to ompi_request_complete(). Remove the macro and call the function directly. This commit was SVN r16498. --- ompi/mca/pml/base/pml_base_request.h | 5 ----- ompi/mca/pml/cm/pml_cm_recvreq.h | 6 +++--- ompi/mca/pml/cm/pml_cm_sendreq.h | 6 +++--- ompi/mca/pml/dr/pml_dr_recvreq.c | 2 +- ompi/mca/pml/dr/pml_dr_recvreq.h | 2 +- ompi/mca/pml/dr/pml_dr_sendreq.h | 2 +- ompi/mca/pml/ob1/pml_ob1_recvreq.h | 2 +- ompi/mca/pml/ob1/pml_ob1_sendreq.h | 3 +-- 8 files changed, 11 insertions(+), 17 deletions(-) diff --git a/ompi/mca/pml/base/pml_base_request.h b/ompi/mca/pml/base/pml_base_request.h index 653e0335a1..f5a19ae522 100644 --- a/ompi/mca/pml/base/pml_base_request.h +++ b/ompi/mca/pml/base/pml_base_request.h @@ -76,11 +76,6 @@ typedef struct mca_pml_base_request_t mca_pml_base_request_t; OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_pml_base_request_t); -/* - * Mark the MPI request as completed and trigger the condition if required. - */ -#define MCA_PML_BASE_REQUEST_MPI_COMPLETE(req) ompi_request_complete(req) - #if defined(c_plusplus) || defined(__cplusplus) } #endif diff --git a/ompi/mca/pml/cm/pml_cm_recvreq.h b/ompi/mca/pml/cm/pml_cm_recvreq.h index 96e7293b85..fc0291ad71 100644 --- a/ompi/mca/pml/cm/pml_cm_recvreq.h +++ b/ompi/mca/pml/cm/pml_cm_recvreq.h @@ -214,7 +214,7 @@ do { \ */ #define MCA_PML_CM_THIN_RECV_REQUEST_MPI_COMPLETE( recvreq ) \ do { \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &(recvreq->req_base.req_ompi) ); \ + ompi_request_complete( &(recvreq->req_base.req_ompi) ); \ } while (0) @@ -233,7 +233,7 @@ do { \ MCA_PML_CM_THIN_RECV_REQUEST_RETURN( recvreq ); \ } else { \ recvreq->req_base.req_pml_complete = true; \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &(recvreq->req_base.req_ompi) ); \ + ompi_request_complete( &(recvreq->req_base.req_ompi) ); \ } \ OPAL_THREAD_UNLOCK(&ompi_request_lock); \ } while(0) @@ -262,7 +262,7 @@ do { \ ompi_convertor_set_position(&recvreq->req_base.req_convertor, &offset); \ } \ recvreq->req_base.req_pml_complete = true; \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &(recvreq->req_base.req_ompi) ); \ + ompi_request_complete( &(recvreq->req_base.req_ompi) ); \ } \ OPAL_THREAD_UNLOCK(&ompi_request_lock); \ } while(0) diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.h b/ompi/mca/pml/cm/pml_cm_sendreq.h index 4b19fc4f0c..079bb18ff1 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.h +++ b/ompi/mca/pml/cm/pml_cm_sendreq.h @@ -260,7 +260,7 @@ do { \ if(OMPI_SUCCESS == ret && \ sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED) { \ sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR = 0; \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE(&(sendreq)->req_send.req_base.req_ompi); \ + ompi_request_complete(&(sendreq)->req_send.req_base.req_ompi); \ } \ } \ } while (0) @@ -284,7 +284,7 @@ do { \ OPAL_THREAD_LOCK(&ompi_request_lock); \ if( false == sendreq->req_send.req_base.req_ompi.req_complete ) { \ /* Should only be called for long messages (maybe synchronous) */ \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE(&(sendreq->req_send.req_base.req_ompi)); \ + ompi_request_complete(&(sendreq->req_send.req_base.req_ompi)); \ } \ sendreq->req_send.req_base.req_pml_complete = true; \ \ @@ -330,7 +330,7 @@ do { \ OPAL_THREAD_LOCK(&ompi_request_lock); \ if( false == sendreq->req_send.req_base.req_ompi.req_complete ) { \ /* Should only be called for long messages (maybe synchronous) */ \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE(&(sendreq->req_send.req_base.req_ompi)); \ + ompi_request_complete(&(sendreq->req_send.req_base.req_ompi)); \ } \ sendreq->req_send.req_base.req_pml_complete = true; \ \ diff --git a/ompi/mca/pml/dr/pml_dr_recvreq.c b/ompi/mca/pml/dr/pml_dr_recvreq.c index c52561468e..b7dec44514 100644 --- a/ompi/mca/pml/dr/pml_dr_recvreq.c +++ b/ompi/mca/pml/dr/pml_dr_recvreq.c @@ -112,7 +112,7 @@ static int mca_pml_dr_recv_request_cancel(struct ompi_request_t* ompi_request, i * on this request will be able to complete. As the status is marked as * cancelled the cancel state will be detected. */ - MCA_PML_BASE_REQUEST_MPI_COMPLETE(ompi_request); + ompi_request_complete(ompi_request); OPAL_THREAD_UNLOCK(&ompi_request_lock); return OMPI_SUCCESS; } diff --git a/ompi/mca/pml/dr/pml_dr_recvreq.h b/ompi/mca/pml/dr/pml_dr_recvreq.h index f4e44b2bf4..122b75eb59 100644 --- a/ompi/mca/pml/dr/pml_dr_recvreq.h +++ b/ompi/mca/pml/dr/pml_dr_recvreq.h @@ -136,7 +136,7 @@ do { recvreq->req_recv.req_base.req_ompi.req_status._count = \ recvreq->req_bytes_received; \ } \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &(recvreq->req_recv.req_base.req_ompi) ); \ + ompi_request_complete( &(recvreq->req_recv.req_base.req_ompi) ); \ \ if( true == recvreq->req_recv.req_base.req_free_called ) { \ MCA_PML_DR_RECV_REQUEST_RETURN( recvreq ); \ diff --git a/ompi/mca/pml/dr/pml_dr_sendreq.h b/ompi/mca/pml/dr/pml_dr_sendreq.h index 16c2be011d..ce00daff78 100644 --- a/ompi/mca/pml/dr/pml_dr_sendreq.h +++ b/ompi/mca/pml/dr/pml_dr_sendreq.h @@ -220,7 +220,7 @@ do { (sendreq)->req_send.req_base.req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \ (sendreq)->req_send.req_base.req_ompi.req_status._count = \ (sendreq)->req_send.req_bytes_packed; \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &((sendreq)->req_send.req_base.req_ompi) ); \ + ompi_request_complete( &((sendreq)->req_send.req_base.req_ompi) ); \ } while(0) /* diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index 3ab992e50f..649b9c2da1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -121,7 +121,7 @@ do { \ do { \ PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \ &(recvreq->req_recv.req_base), PERUSE_RECV ); \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &(recvreq->req_recv.req_base.req_ompi) ); \ + ompi_request_complete( &(recvreq->req_recv.req_base.req_ompi) ); \ } while (0) /* diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index 4011a47785..36ad87be64 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -189,9 +189,8 @@ do { (sendreq)->req_send.req_base.req_ompi.req_status.MPI_ERROR = OMPI_SUCCESS; \ (sendreq)->req_send.req_base.req_ompi.req_status._count = \ (int)(sendreq)->req_send.req_bytes_packed; \ - MCA_PML_BASE_REQUEST_MPI_COMPLETE( &((sendreq)->req_send.req_base.req_ompi) ); \ + ompi_request_complete( &((sendreq)->req_send.req_base.req_ompi) ); \ \ - /* Could be moved to MCA_PML_BASE_REQUEST_MPI_COMPLETE, but before broadcast */ \ PERUSE_TRACE_COMM_EVENT( PERUSE_COMM_REQ_COMPLETE, \ &(sendreq->req_send.req_base), PERUSE_SEND); \ } while(0)