diff --git a/ompi/mca/pml/uniq/pml_uniq.c b/ompi/mca/pml/uniq/pml_uniq.c index e0db276dfe..39946c127a 100644 --- a/ompi/mca/pml/uniq/pml_uniq.c +++ b/ompi/mca/pml/uniq/pml_uniq.c @@ -274,17 +274,17 @@ int mca_pml_uniq_add_procs(ompi_proc_t** procs, size_t nprocs) ptl->ptl_cache_bytes > 0 && NULL != ptl->ptl_request_init && NULL != ptl->ptl_request_fini) { - - mca_pml_base_ptl_t* ptl_base = OBJ_NEW(mca_pml_base_ptl_t); + + mca_pml_uniq_ptl_t* ptl_base = OBJ_NEW(mca_pml_uniq_ptl_t); ptl_base->ptl = ptl; ptl_base->ptl_cache_size = ptl->ptl_cache_size; - ptl->ptl_base = ptl_base; + ptl->ptl_base = (struct mca_pml_base_ptl_t*)ptl_base; } - proc_pml->proc_ptl_first.ptl_base = ptl->ptl_base; + proc_pml->proc_ptl_first.ptl_base = (mca_pml_base_ptl_t*)ptl->ptl_base; proc_pml->proc_ptl_first.ptl_peer = ptl_peers[p]; proc_pml->proc_ptl_first.ptl = ptl; #if PML_UNIQ_ACCEPT_NEXT_PTL - proc_pml->proc_ptl_next.ptl_base = ptl->ptl_base; + proc_pml->proc_ptl_next.ptl_base = (mca_pml_base_ptl_t*)ptl->ptl_base; proc_pml->proc_ptl_next.ptl_peer = ptl_peers[p]; proc_pml->proc_ptl_next.ptl = ptl; #endif /* PML_UNIQ_ACCEPT_NEXT_PTL */ diff --git a/ompi/mca/pml/uniq/pml_uniq_proc.h b/ompi/mca/pml/uniq/pml_uniq_proc.h index 8b388574f4..59f5b647ee 100644 --- a/ompi/mca/pml/uniq/pml_uniq_proc.h +++ b/ompi/mca/pml/uniq/pml_uniq_proc.h @@ -42,7 +42,7 @@ extern "C" { */ struct mca_ptl_proc_t { struct mca_ptl_base_peer_t* ptl_peer; /**< PTL addressing info */ - struct mca_pml_base_ptl_t* ptl_base; /**< PML specific PTL info */ + struct mca_pml_uniq_ptl_t* ptl_base; /**< PML specific PTL info */ mca_ptl_base_module_t *ptl; /**< PTL module */ }; typedef struct mca_ptl_proc_t mca_ptl_proc_t; diff --git a/ompi/mca/pml/uniq/pml_uniq_ptl.c b/ompi/mca/pml/uniq/pml_uniq_ptl.c index be575d7fb6..61bd9297c0 100644 --- a/ompi/mca/pml/uniq/pml_uniq_ptl.c +++ b/ompi/mca/pml/uniq/pml_uniq_ptl.c @@ -20,7 +20,7 @@ #include "pml_uniq_ptl.h" -static void mca_pml_uniq_ptl_construct(mca_pml_base_ptl_t* ptl) +static void mca_pml_uniq_ptl_construct(mca_pml_uniq_ptl_t* ptl) { OBJ_CONSTRUCT(&ptl->ptl_cache, opal_list_t); OBJ_CONSTRUCT(&ptl->ptl_cache_lock, opal_mutex_t); @@ -29,14 +29,14 @@ static void mca_pml_uniq_ptl_construct(mca_pml_base_ptl_t* ptl) ptl->ptl_cache_alloc = 0; } -static void mca_pml_uniq_ptl_destruct(mca_pml_base_ptl_t* ptl) +static void mca_pml_uniq_ptl_destruct(mca_pml_uniq_ptl_t* ptl) { OBJ_DESTRUCT(&ptl->ptl_cache); OBJ_DESTRUCT(&ptl->ptl_cache_lock); } OBJ_CLASS_INSTANCE( - mca_pml_base_ptl_t, + mca_pml_uniq_ptl_t, opal_list_t, mca_pml_uniq_ptl_construct, mca_pml_uniq_ptl_destruct diff --git a/ompi/mca/pml/uniq/pml_uniq_ptl.h b/ompi/mca/pml/uniq/pml_uniq_ptl.h index 8dbdb3144c..8f26bf5455 100644 --- a/ompi/mca/pml/uniq/pml_uniq_ptl.h +++ b/ompi/mca/pml/uniq/pml_uniq_ptl.h @@ -27,16 +27,17 @@ extern "C" { #endif -struct mca_pml_base_ptl_t { +struct mca_pml_uniq_ptl_t { opal_list_t ptl_cache; /**< cache of send requests */ size_t ptl_cache_size; /**< maximum size of cache */ size_t ptl_cache_alloc; /**< current number of allocated items */ opal_mutex_t ptl_cache_lock; /**< lock for queue access */ struct mca_ptl_base_module_t* ptl; /**< back pointer to ptl */ }; -typedef struct mca_pml_base_ptl_t mca_pml_base_ptl_t; +typedef struct mca_pml_uniq_ptl_t mca_pml_uniq_ptl_t; +typedef struct mca_pml_uniq_ptl_t mca_pml_base_ptl_t; -OBJ_CLASS_DECLARATION(mca_pml_base_ptl_t); +OBJ_CLASS_DECLARATION(mca_pml_uniq_ptl_t); #if defined(c_plusplus) || defined(__cplusplus) } diff --git a/ompi/mca/pml/uniq/pml_uniq_recvreq.h b/ompi/mca/pml/uniq/pml_uniq_recvreq.h index 71ec10e0ad..830eb11d7b 100644 --- a/ompi/mca/pml/uniq/pml_uniq_recvreq.h +++ b/ompi/mca/pml/uniq/pml_uniq_recvreq.h @@ -90,7 +90,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_recv_request_t); * @param request (IN) Request to match. */ void mca_pml_uniq_recv_request_match_wild(mca_ptl_base_recv_request_t* request); - + /** * Attempt to match the request against the unexpected fragment list * for a specific source rank. @@ -98,7 +98,7 @@ void mca_pml_uniq_recv_request_match_wild(mca_ptl_base_recv_request_t* request); * @param request (IN) Request to match. */ void mca_pml_uniq_recv_request_match_specific(mca_ptl_base_recv_request_t* request); - + /** * Start an initialized request. * diff --git a/ompi/mca/pml/uniq/pml_uniq_sendreq.h b/ompi/mca/pml/uniq/pml_uniq_sendreq.h index abd7d27257..6eade893b1 100644 --- a/ompi/mca/pml/uniq/pml_uniq_sendreq.h +++ b/ompi/mca/pml/uniq/pml_uniq_sendreq.h @@ -44,7 +44,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); { \ mca_pml_uniq_proc_t *proc = \ (mca_pml_uniq_proc_t*) mca_pml_uniq_proc_lookup_remote(comm,dst); \ - mca_pml_base_ptl_t* ptl_base; \ + mca_pml_uniq_ptl_t* ptl_base; \ \ if(NULL == proc) { \ return OMPI_ERR_OUT_OF_RESOURCE; \ @@ -122,7 +122,7 @@ OBJ_CLASS_DECLARATION(mca_pml_uniq_send_request_t); #define MCA_PML_UNIQ_SEND_REQUEST_RETURN(sendreq) \ { \ mca_ptl_base_module_t* ptl = (sendreq)->req_ptl; \ - mca_pml_base_ptl_t* ptl_base = ptl->ptl_base; \ + mca_pml_uniq_ptl_t* ptl_base = (mca_pml_uniq_ptl_t*)ptl->ptl_base; \ \ /* Let the base handle the reference counts */ \ MCA_PML_BASE_SEND_REQUEST_FINI( &((sendreq)->req_send) ); \