From 4a7211468bac33842a93e7f67212969d4835bb2c Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 23 May 2005 23:05:15 +0000 Subject: [PATCH] Adapt to the last commits from Tim. This commit was SVN r5837. --- src/mca/pml/uniq/pml_uniq.c | 21 +++++++++++---------- src/mca/pml/uniq/pml_uniq.h | 11 +++-------- src/mca/pml/uniq/pml_uniq_component.c | 2 +- src/mca/pml/uniq/pml_uniq_iprobe.c | 6 +++--- src/mca/pml/uniq/pml_uniq_recvreq.h | 6 +++--- src/mca/pml/uniq/pml_uniq_sendreq.h | 2 +- 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/mca/pml/uniq/pml_uniq.c b/src/mca/pml/uniq/pml_uniq.c index 036dba1db3..39213bb131 100644 --- a/src/mca/pml/uniq/pml_uniq.c +++ b/src/mca/pml/uniq/pml_uniq.c @@ -41,8 +41,7 @@ mca_pml_uniq_t mca_pml_uniq = { { mca_pml_uniq_add_procs, mca_pml_uniq_del_procs, - mca_pml_uniq_add_ptls, - mca_pml_uniq_control, + mca_pml_uniq_enable, mca_pml_uniq_progress, mca_pml_uniq_add_comm, mca_pml_uniq_del_comm, @@ -92,13 +91,12 @@ static int ptl_exclusivity_compare(const void* arg1, const void* arg2) } -int mca_pml_uniq_add_ptls(ompi_list_t *ptls) +int mca_pml_uniq_add_ptls( void ) { /* build an array of ptls and ptl modules */ mca_ptl_base_selected_module_t* selected_ptl; - size_t num_ptls = ompi_list_get_size(ptls); + size_t num_ptls = ompi_list_get_size(&mca_ptl_base_modules_initialized); size_t cache_bytes = 0; - mca_pml_uniq.uniq_num_ptl_modules = 0; mca_pml_uniq.uniq_num_ptl_progress = 0; mca_pml_uniq.uniq_num_ptl_components = 0; @@ -111,9 +109,11 @@ int mca_pml_uniq_add_ptls(ompi_list_t *ptls) return OMPI_ERR_OUT_OF_RESOURCE; } - for(selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_first(ptls); - selected_ptl != (mca_ptl_base_selected_module_t*)ompi_list_get_end(ptls); - selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_next(selected_ptl)) { + for(selected_ptl = (mca_ptl_base_selected_module_t*) + ompi_list_get_first(&mca_ptl_base_modules_initialized); + selected_ptl != (mca_ptl_base_selected_module_t*) + ompi_list_get_end(&mca_ptl_base_modules_initialized); + selected_ptl = (mca_ptl_base_selected_module_t*)ompi_list_get_next(selected_ptl)) { mca_ptl_base_module_t *ptl = selected_ptl->pbsm_module; size_t i; @@ -165,12 +165,13 @@ int mca_pml_uniq_add_ptls(ompi_list_t *ptls) * Pass control information through to all PTL modules. */ -int mca_pml_uniq_control(int param, void* value, size_t size) +int mca_pml_uniq_enable( bool enable ) { size_t i; + int value = enable; for( i = 0; i < mca_pml_uniq.uniq_num_ptl_components; i++ ) { if(NULL != mca_pml_uniq.uniq_ptl_components[i]->ptlm_control) { - int rc = mca_pml_uniq.uniq_ptl_components[i]->ptlm_control(param,value,size); + int rc = mca_pml_uniq.uniq_ptl_components[i]->ptlm_control(MCA_PTL_ENABLE,&value,sizeof(value)); if(rc != OMPI_SUCCESS) return rc; } diff --git a/src/mca/pml/uniq/pml_uniq.h b/src/mca/pml/uniq/pml_uniq.h index 42f943377a..d18772ed04 100644 --- a/src/mca/pml/uniq/pml_uniq.h +++ b/src/mca/pml/uniq/pml_uniq.h @@ -111,14 +111,10 @@ extern int mca_pml_uniq_del_procs( size_t nprocs ); -extern int mca_pml_uniq_add_ptls( - ompi_list_t *ptls -); +extern int mca_pml_uniq_add_ptls(void); -extern int mca_pml_uniq_control( - int param, - void *size, - size_t value +extern int mca_pml_uniq_enable( + bool enable ); extern int mca_pml_uniq_progress(void); @@ -223,7 +219,6 @@ extern int mca_pml_uniq_start( pml_request->req_free_called = true; \ if( pml_request->req_pml_complete == true) \ { \ - OMPI_REQUEST_FINI(*(request)); \ switch(pml_request->req_type) { \ case MCA_PML_REQUEST_SEND: \ { \ diff --git a/src/mca/pml/uniq/pml_uniq_component.c b/src/mca/pml/uniq/pml_uniq_component.c index a89f9e5747..577e3d2eb0 100644 --- a/src/mca/pml/uniq/pml_uniq_component.c +++ b/src/mca/pml/uniq/pml_uniq_component.c @@ -180,7 +180,7 @@ mca_pml_base_module_t* mca_pml_uniq_component_init(int* priority, if(rc != OMPI_SUCCESS) return NULL; - mca_pml_teg_add_ptls(); + mca_pml_uniq_add_ptls(); return &mca_pml_uniq.super; } diff --git a/src/mca/pml/uniq/pml_uniq_iprobe.c b/src/mca/pml/uniq/pml_uniq_iprobe.c index 2314cbcb0e..5bf4f12c96 100644 --- a/src/mca/pml/uniq/pml_uniq_iprobe.c +++ b/src/mca/pml/uniq/pml_uniq_iprobe.c @@ -44,7 +44,7 @@ int mca_pml_uniq_iprobe(int src, ompi_progress(); } } - MCA_PML_UNIQ_RECV_REQUEST_RETURN( &recvreq ); + MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); return rc; } @@ -63,7 +63,7 @@ int mca_pml_uniq_probe(int src, MCA_PML_UNIQ_RECV_REQUEST_INIT(&recvreq, NULL, 0, &ompi_mpi_char, src, tag, comm, true); if ((rc = mca_pml_uniq_recv_request_start(&recvreq)) != OMPI_SUCCESS) { - MCA_PML_UNIQ_RECV_REQUEST_RETURN( &recvreq ); + MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); return rc; } @@ -87,7 +87,7 @@ int mca_pml_uniq_probe(int src, if (NULL != status) { *status = recvreq.req_recv.req_base.req_ompi.req_status; } - MCA_PML_UNIQ_RECV_REQUEST_RETURN( &recvreq ); + MCA_PML_BASE_RECV_REQUEST_FINI( &recvreq.req_recv ); return OMPI_SUCCESS; } diff --git a/src/mca/pml/uniq/pml_uniq_recvreq.h b/src/mca/pml/uniq/pml_uniq_recvreq.h index ab481faf6c..a6d7835851 100644 --- a/src/mca/pml/uniq/pml_uniq_recvreq.h +++ b/src/mca/pml/uniq/pml_uniq_recvreq.h @@ -75,9 +75,9 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_recv_request_t); * * @param request (IN) Receive request. */ -#define MCA_PML_UNIQ_RECV_REQUEST_RETURN(request) \ - do { \ - MCA_PML_BASE_RECV_REQUEST_RETURN( &((request)->req_recv) ); \ +#define MCA_PML_UNIQ_RECV_REQUEST_RETURN(request) \ + do { \ + MCA_PML_BASE_RECV_REQUEST_FINI( &((request)->req_recv) ); \ OMPI_FREE_LIST_RETURN(&mca_pml_uniq.uniq_recv_requests, (ompi_list_item_t*)(request)); \ } while(0) diff --git a/src/mca/pml/uniq/pml_uniq_sendreq.h b/src/mca/pml/uniq/pml_uniq_sendreq.h index a868e88569..f4d37a4848 100644 --- a/src/mca/pml/uniq/pml_uniq_sendreq.h +++ b/src/mca/pml/uniq/pml_uniq_sendreq.h @@ -122,7 +122,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); mca_pml_base_ptl_t* ptl_base = ptl->ptl_base; \ \ /* Let the base handle the reference counts */ \ - MCA_PML_BASE_SEND_REQUEST_RETURN( &((sendreq)->req_send) ); \ + MCA_PML_BASE_SEND_REQUEST_FINI( &((sendreq)->req_send) ); \ \ /* \ * If there is a cache associated with the ptl - first attempt \