diff --git a/ompi/mca/btl/udapl/btl_udapl.c b/ompi/mca/btl/udapl/btl_udapl.c index 67caef1299..b712e87d88 100644 --- a/ompi/mca/btl/udapl/btl_udapl.c +++ b/ompi/mca/btl/udapl/btl_udapl.c @@ -327,14 +327,15 @@ failure: int mca_btl_udapl_finalize(struct mca_btl_base_module_t* base_btl) { mca_btl_udapl_module_t* udapl_btl = (mca_btl_udapl_module_t*) base_btl; - + int32_t i; + /* * Cleaning up the endpoints here because mca_btl_udapl_del_procs * is never called by upper layers. * Note: this is only looking at those endpoints which are available * off of the btl module rdma list. */ - for (int i=0; i < udapl_btl->udapl_eager_rdma_endpoint_count; i++) { + for (i=0; i < udapl_btl->udapl_eager_rdma_endpoint_count; i++) { mca_btl_udapl_endpoint_t* endpoint = orte_pointer_array_get_item(udapl_btl->udapl_eager_rdma_endpoints, i); @@ -760,7 +761,6 @@ int mca_btl_udapl_put( int rc = OMPI_SUCCESS; mca_btl_udapl_frag_t* frag = (mca_btl_udapl_frag_t*)des; - mca_btl_base_segment_t *src_segment = des->des_src; mca_btl_base_segment_t *dst_segment = des->des_dst; frag->btl = (mca_btl_udapl_module_t *)btl; diff --git a/ompi/mca/btl/udapl/btl_udapl.h b/ompi/mca/btl/udapl/btl_udapl.h index 2a73c69198..fc98306cac 100644 --- a/ompi/mca/btl/udapl/btl_udapl.h +++ b/ompi/mca/btl/udapl/btl_udapl.h @@ -135,7 +135,7 @@ struct mca_btl_udapl_module_t { opal_mutex_t udapl_lock; /* lock for accessing module state */ opal_mutex_t udapl_eager_rdma_lock; /* eager rdma lock */ - uint32_t udapl_eager_rdma_endpoint_count; /* count of the number of + int32_t udapl_eager_rdma_endpoint_count; /* count of the number of * endpoints in * udapl_eager_rdma_endpoints */ diff --git a/ompi/mca/btl/udapl/btl_udapl_component.c b/ompi/mca/btl/udapl/btl_udapl_component.c index f55d5c919e..3f4cd00be7 100644 --- a/ompi/mca/btl/udapl/btl_udapl_component.c +++ b/ompi/mca/btl/udapl/btl_udapl_component.c @@ -45,6 +45,15 @@ #include "orte/util/proc_info.h" #include "ompi/mca/pml/base/pml_base_module_exchange.h" +/* + * Local Functions + */ +static inline int mca_btl_udapl_frag_progress_one(mca_btl_udapl_module_t* udapl_btl, + mca_btl_udapl_frag_t* frag); +void mca_btl_udapl_frag_progress_pending(mca_btl_udapl_module_t* udapl_btl, + mca_btl_base_endpoint_t* endpoint, + const int connection); + mca_btl_udapl_component_t mca_btl_udapl_component = { { @@ -573,7 +582,7 @@ static inline int mca_btl_udapl_frag_progress_one( void mca_btl_udapl_frag_progress_pending(mca_btl_udapl_module_t* udapl_btl, mca_btl_base_endpoint_t* endpoint, - uint32_t connection) + const int connection) { int len; int i; @@ -639,7 +648,8 @@ int mca_btl_udapl_component_progress() #if defined(__SVR4) && defined(__sun) DAT_COUNT nmore; /* used by dat_evd_wait, see comment below */ #endif - int i, j, rdma_ep_count; + size_t i; + int32_t j, rdma_ep_count; int count = 0; /* prevent deadlock - only one thread should be 'progressing' at a time */ @@ -682,8 +692,6 @@ int mca_btl_udapl_component_progress() switch(frag->type) { case MCA_BTL_UDAPL_RDMA_WRITE: { - mca_btl_udapl_endpoint_t* endpoint = frag->endpoint; - assert(frag->base.des_src == &frag->segment); assert(frag->base.des_src_cnt == 1); assert(frag->base.des_dst == NULL); @@ -701,8 +709,6 @@ int mca_btl_udapl_component_progress() } case MCA_BTL_UDAPL_SEND: { - mca_btl_udapl_endpoint_t* endpoint = frag->endpoint; - assert(frag->base.des_src == &frag->segment); assert(frag->base.des_src_cnt == 1); assert(frag->base.des_dst == NULL); @@ -814,8 +820,6 @@ int mca_btl_udapl_component_progress() } case MCA_BTL_UDAPL_PUT: { - mca_btl_udapl_endpoint_t* endpoint = frag->endpoint; - assert(frag->base.des_src == &frag->segment); assert(frag->base.des_src_cnt == 1); assert(frag->base.des_dst_cnt == 1); diff --git a/ompi/mca/btl/udapl/btl_udapl_endpoint.c b/ompi/mca/btl/udapl/btl_udapl_endpoint.c index fc582f1a5a..ecf0b42a51 100644 --- a/ompi/mca/btl/udapl/btl_udapl_endpoint.c +++ b/ompi/mca/btl/udapl/btl_udapl_endpoint.c @@ -55,7 +55,6 @@ static int mca_btl_udapl_endpoint_finish_max(mca_btl_udapl_endpoint_t*); static void mca_btl_udapl_endpoint_connect_eager_rdma(mca_btl_udapl_endpoint_t* endpoint); static int mca_btl_udapl_endpoint_write_eager(mca_btl_base_endpoint_t* endpoint, mca_btl_udapl_frag_t* frag); -static int mca_btl_udapl_endpoint_eager_rdma_set_remote(void); static void mca_btl_udapl_endpoint_control_send_cb(mca_btl_base_module_t* btl, mca_btl_base_endpoint_t* endpoint, mca_btl_base_descriptor_t* descriptor, @@ -196,7 +195,7 @@ int mca_btl_udapl_endpoint_write_eager(mca_btl_base_endpoint_t* endpoint, /* perform zero byte read of the remote memory region */ remote_buffer.target_address = (DAT_VADDR)remote_buf; remote_buffer.segment_length = frag->triplet.segment_length; - local_iov.virtual_address = NULL; + local_iov.virtual_address = (DAT_VADDR)NULL; local_iov.segment_length = 0; cookie.as_ptr = NULL; @@ -463,7 +462,6 @@ int mca_btl_udapl_endpoint_create(mca_btl_udapl_module_t* btl, DAT_EP_HANDLE* udapl_endpoint) { int rc = OMPI_SUCCESS; - DAT_EP_PARAM ep_param; /* Create a new uDAPL endpoint and start the connection process */ rc = dat_ep_create(btl->udapl_ia, btl->udapl_pz, @@ -1258,7 +1256,7 @@ int mca_btl_udapl_endpoint_send_eager_rdma_credits( * @return OMPI_SUCCESS or error status on failure */ int mca_btl_udapl_endpoint_send_sr_credits( - mca_btl_base_endpoint_t* endpoint, uint32_t connection) + mca_btl_base_endpoint_t* endpoint, const int connection) { mca_btl_udapl_sr_credit_t *sr_credit; mca_btl_base_descriptor_t* des; diff --git a/ompi/mca/btl/udapl/btl_udapl_endpoint.h b/ompi/mca/btl/udapl/btl_udapl_endpoint.h index 6f2e64b8df..750d38ea33 100644 --- a/ompi/mca/btl/udapl/btl_udapl_endpoint.h +++ b/ompi/mca/btl/udapl/btl_udapl_endpoint.h @@ -77,8 +77,8 @@ typedef enum { struct mca_btl_udapl_sr_credit_t { mca_btl_udapl_control_header_t control; uint32_t credits; - uint32_t connection; /* 0 == BTL_UDAPL_EAGER_CONNECTION; - 1 == BTL_UDAPL_MAX_CONNECTION */ + int connection; /* 0 == BTL_UDAPL_EAGER_CONNECTION; + 1 == BTL_UDAPL_MAX_CONNECTION */ }; typedef struct mca_btl_udapl_sr_credit_t mca_btl_udapl_sr_credit_t; @@ -185,7 +185,7 @@ int mca_btl_udapl_endpoint_create(struct mca_btl_udapl_module_t* btl, * Send number of send recv credits */ int mca_btl_udapl_endpoint_send_sr_credits(mca_btl_base_endpoint_t* endpoint, - uint32_t connection); + const int connection); #if defined(c_plusplus) || defined(__cplusplus) }