Problem surfaced while running Intel MPI 3.1 and mpich2-test suite. dapli_destroy_cm was incorrectly removing reference to qp_handle in endpoint and destroy_cq and destroy_pd code was ignoring verbs errors.
Signed-off by: Arlin Davis [EMAIL PROTECTED] --- dapl/openib_scm/dapl_ib_cm.c | 4 +--- dapl/openib_scm/dapl_ib_cq.c | 13 ++++--------- dapl/openib_scm/dapl_ib_mem.c | 8 +------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/dapl/openib_scm/dapl_ib_cm.c b/dapl/openib_scm/dapl_ib_cm.c index 9e686d6..f78ebe6 100644 --- a/dapl/openib_scm/dapl_ib_cm.c +++ b/dapl/openib_scm/dapl_ib_cm.c @@ -108,10 +108,8 @@ static void dapli_cm_destroy(struct ib_cm_handle *cm_ptr) dapl_os_lock(&cm_ptr->lock); cm_ptr->state = SCM_DESTROY; - if (cm_ptr->ep) { + if (cm_ptr->ep) cm_ptr->ep->cm_handle = IB_INVALID_HANDLE; - cm_ptr->ep->qp_handle = IB_INVALID_HANDLE; - } /* close socket if still active */ if (cm_ptr->socket >= 0) { diff --git a/dapl/openib_scm/dapl_ib_cq.c b/dapl/openib_scm/dapl_ib_cq.c index 56b729e..7d6bd4f 100644 --- a/dapl/openib_scm/dapl_ib_cq.c +++ b/dapl/openib_scm/dapl_ib_cq.c @@ -423,20 +423,15 @@ DAT_RETURN dapls_ib_cq_free ( IN DAPL_EVD *evd_ptr) { DAT_EVENT event; + ib_work_completion_t wc; if (evd_ptr->ib_cq_handle != IB_INVALID_HANDLE) { /* pull off CQ and EVD entries and toss */ - while (dapls_ib_completion_poll == DAT_SUCCESS); - while (dapl_evd_dequeue(evd_ptr,&event) != DAT_QUEUE_EMPTY); -#if 1 - ibv_destroy_cq(evd_ptr->ib_cq_handle); - evd_ptr->ib_cq_handle = IB_INVALID_HANDLE; - return DAT_SUCCESS; -#else + while (ibv_poll_cq(evd_ptr->ib_cq_handle, 1, &wc) == 1); + while (dapl_evd_dequeue(evd_ptr, &event) == DAT_SUCCESS); if (ibv_destroy_cq(evd_ptr->ib_cq_handle)) - return(dapl_convert_errno(errno,"destroy_cq")); + return(dapl_convert_errno(errno,"ibv_destroy_cq")); evd_ptr->ib_cq_handle = IB_INVALID_HANDLE; -#endif } return DAT_SUCCESS; } diff --git a/dapl/openib_scm/dapl_ib_mem.c b/dapl/openib_scm/dapl_ib_mem.c index 6a5e4a2..0faccc8 100644 --- a/dapl/openib_scm/dapl_ib_mem.c +++ b/dapl/openib_scm/dapl_ib_mem.c @@ -136,15 +136,9 @@ DAT_RETURN dapls_ib_pd_free(IN DAPL_PZ *pz ) { if (pz->pd_handle != IB_INVALID_HANDLE) { -#if 1 - ibv_dealloc_pd(pz->pd_handle); - pz->pd_handle = IB_INVALID_HANDLE; - return DAT_SUCCESS; -#else if (ibv_dealloc_pd(pz->pd_handle)) - return(dapl_convert_errno(errno,"dealloc_pd")); + return(dapl_convert_errno(errno,"ibv_dealloc_pd")); pz->pd_handle = IB_INVALID_HANDLE; -#endif } return DAT_SUCCESS; } -- 1.5.2.5 _______________________________________________ general mailing list general@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general