diff --git a/opal/mca/btl/ugni/btl_ugni_add_procs.c b/opal/mca/btl/ugni/btl_ugni_add_procs.c index 2dc5c08003..8a40302509 100644 --- a/opal/mca/btl/ugni/btl_ugni_add_procs.c +++ b/opal/mca/btl/ugni/btl_ugni_add_procs.c @@ -149,7 +149,7 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl, rc = GNI_EpCreate (ugni_module->device->dev_handle, ugni_module->rdma_local_cq, &ugni_module->local_ep); OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { + if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) { BTL_ERROR(("error creating local ugni endpoint")); return opal_common_rc_ugni_to_opal (rc); } @@ -159,7 +159,7 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl, ugni_module->device->dev_addr, getpid()); OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { + if (OPAL_UNLIKELY(OPAL_SUCCESS != rc)) { BTL_ERROR(("error binding local ugni endpoint")); return opal_common_rc_ugni_to_opal (rc); } @@ -185,7 +185,7 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl, } OPAL_THREAD_LOCK(&ugni_module->device->dev_lock); - status = GNI_MemRegister(ugni_module->device->dev_handle, + rc = GNI_MemRegister(ugni_module->device->dev_handle, (unsigned long)howards_start_addr, 4096, ugni_module->smsg_remote_irq_cq, @@ -195,7 +195,7 @@ int mca_btl_ugni_add_procs(struct mca_btl_base_module_t* btl, #if 1 { unsigned long *vec = (unsigned long *)&mca_btl_ugni_component.modules[0].device->smsg_irq_mhndl; - fprintf(stderr,"status = %d memory handle contents 0x%lx 0x%lx\n",status,vec[0],vec[1]); + fprintf(stderr,"status = %d memory handle contents 0x%lx 0x%lx\n",rc,vec[0],vec[1]); } #endif OPAL_THREAD_UNLOCK(&ugni_module->device->dev_lock); diff --git a/opal/mca/btl/ugni/btl_ugni_frag.h b/opal/mca/btl/ugni/btl_ugni_frag.h index 319fd89f0a..4150404bc2 100644 --- a/opal/mca/btl/ugni/btl_ugni_frag.h +++ b/opal/mca/btl/ugni/btl_ugni_frag.h @@ -81,7 +81,7 @@ typedef struct mca_btl_ugni_base_frag_t { mca_btl_base_endpoint_t *endpoint; mca_btl_ugni_reg_t *registration; ompi_free_list_t *my_list; - frag_cb_t *cbfunc; + frag_cb_t cbfunc; } mca_btl_ugni_base_frag_t; typedef struct mca_btl_ugni_base_frag_t mca_btl_ugni_smsg_frag_t; diff --git a/opal/mca/btl/ugni/btl_ugni_progress_thread.c b/opal/mca/btl/ugni/btl_ugni_progress_thread.c index 9603de0df6..b5e929f3f7 100644 --- a/opal/mca/btl/ugni/btl_ugni_progress_thread.c +++ b/opal/mca/btl/ugni/btl_ugni_progress_thread.c @@ -89,7 +89,7 @@ static void *mca_btl_ugni_prog_thread_fn(void * data) } rc = pthread_cond_signal(&progress_cond); - return OMPI_SUCCESS; + return OPAL_SUCCESS; } int mca_btl_ugni_spawn_progress_thread(struct mca_btl_base_module_t *btl) @@ -113,7 +113,7 @@ int mca_btl_ugni_spawn_progress_thread(struct mca_btl_base_module_t *btl) fprintf(stderr,"Hey, pthread_attr_destroy returned with error %d (%s) \n",errno,strerror(errno)); } - return OMPI_SUCCESS; + return OPAL_SUCCESS; } int mca_btl_ugni_kill_progress_thread(void) @@ -163,11 +163,11 @@ int mca_btl_ugni_kill_progress_thread(void) OPAL_THREAD_LOCK(&mca_btl_ugni_component.modules[0].device->dev_lock); status = GNI_EpDestroy (mca_btl_ugni_component.modules[0].local_ep); OPAL_THREAD_UNLOCK(&mca_btl_ugni_component.modules[0].device->dev_lock); - if (OPAL_UNLIKELY(OMPI_SUCCESS != status)) { + if (OPAL_UNLIKELY(GNI_RC_SUCCESS != status)) { BTL_ERROR(("error destroy local ep endpoint - %s", gni_err_str[status])); - return opal_common_rc_ugni_to_opali (status); + return opal_common_rc_ugni_to_opal(status); } - return OMPI_SUCCESS; + return OPAL_SUCCESS; } diff --git a/opal/mca/btl/ugni/btl_ugni_rdma.h b/opal/mca/btl/ugni/btl_ugni_rdma.h index 03374526f7..596557c1e4 100644 --- a/opal/mca/btl/ugni/btl_ugni_rdma.h +++ b/opal/mca/btl/ugni/btl_ugni_rdma.h @@ -64,6 +64,17 @@ static inline int mca_btl_ugni_post_fma (mca_btl_ugni_base_frag_t *frag, gni_pos return OPAL_SUCCESS; } +static void mca_btl_ugni_write_to_self_complete(struct mca_btl_ugni_base_frag_t *frag, int rc) +{ + frag->flags |= MCA_BTL_UGNI_FRAG_COMPLETE; + + BTL_VERBOSE(("cqwrite frag complete")); +#if 0 + fprintf(stderr,"returning cq_frag %p\n",frag); +#endif + mca_btl_ugni_frag_return (frag); +} + static inline int mca_btl_ugni_post_bte (mca_btl_ugni_base_frag_t *frag, gni_post_type_t op_type, mca_btl_ugni_segment_t *lcl_seg, mca_btl_ugni_segment_t *rem_seg) {