diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index 5d318dc89c0..0d81f5fabac 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -496,7 +496,7 @@ get_to_iovec(ompi_osc_portals4_module_t *module, ptrdiff_t length, origin_lb, target_lb, extent; ptl_md_t md; - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -583,7 +583,7 @@ atomic_get_to_iovec(ompi_osc_portals4_module_t *module, ptrdiff_t length, origin_lb, target_lb, extent; ptl_md_t md; - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -665,7 +665,7 @@ put_from_iovec(ompi_osc_portals4_module_t *module, ptrdiff_t length, origin_lb, target_lb, extent; ptl_md_t md; - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -754,7 +754,7 @@ atomic_put_from_iovec(ompi_osc_portals4_module_t *module, ptrdiff_t length, origin_lb, target_lb, extent; ptl_md_t md; - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -841,7 +841,7 @@ atomic_from_iovec(ompi_osc_portals4_module_t *module, ptl_op_t ptl_op; ptl_datatype_t ptl_dt; - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -940,7 +940,7 @@ swap_to_iovec(ompi_osc_portals4_module_t *module, ptl_md_t md; ptl_datatype_t ptl_dt; - if (module->result_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->result_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->result_iovec_md_h); free(module->result_iovec_list); module->result_iovec_md_h = PTL_INVALID_HANDLE; @@ -971,7 +971,7 @@ swap_to_iovec(ompi_osc_portals4_module_t *module, return ret; } - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; @@ -1066,7 +1066,7 @@ fetch_atomic_to_iovec(ompi_osc_portals4_module_t *module, ptl_op_t ptl_op; ptl_datatype_t ptl_dt; - if (module->result_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->result_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->result_iovec_md_h); free(module->result_iovec_list); module->result_iovec_md_h = PTL_INVALID_HANDLE; @@ -1097,7 +1097,7 @@ fetch_atomic_to_iovec(ompi_osc_portals4_module_t *module, return ret; } - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); module->origin_iovec_md_h = PTL_INVALID_HANDLE; diff --git a/ompi/mca/osc/portals4/osc_portals4_component.c b/ompi/mca/osc/portals4/osc_portals4_component.c index 1e0edbb1f2e..e2725b8af00 100644 --- a/ompi/mca/osc/portals4/osc_portals4_component.c +++ b/ompi/mca/osc/portals4/osc_portals4_component.c @@ -655,11 +655,11 @@ ompi_osc_portals4_free(struct ompi_win_t *win) PtlMEUnlink(module->control_me_h); PtlMEUnlink(module->data_me_h); PtlMDRelease(module->md_h); - if (module->origin_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->origin_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->origin_iovec_md_h); free(module->origin_iovec_list); } - if (module->result_iovec_md_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(module->result_iovec_md_h,PTL_INVALID_HANDLE)) { PtlMDRelease(module->result_iovec_md_h); free(module->result_iovec_list); } diff --git a/opal/mca/btl/portals4/btl_portals4.c b/opal/mca/btl/portals4/btl_portals4.c index 77f5e909cd5..d71c69a8943 100644 --- a/opal/mca/btl/portals4/btl_portals4.c +++ b/opal/mca/btl/portals4/btl_portals4.c @@ -487,13 +487,13 @@ int mca_btl_portals4_free(struct mca_btl_base_module_t *btl_base, mca_btl_base_d OPAL_BTL_PORTALS4_FRAG_RETURN_EAGER(portals4_btl, frag); } else if (BTL_PORTALS4_FRAG_TYPE_MAX == frag->type) { - if (frag->me_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(frag->me_h,PTL_INVALID_HANDLE)) { frag->me_h = PTL_INVALID_HANDLE; } OPAL_BTL_PORTALS4_FRAG_RETURN_MAX(portals4_btl, frag); } else if (BTL_PORTALS4_FRAG_TYPE_USER == frag->type) { - if (frag->me_h != PTL_INVALID_HANDLE) { + if (!PtlHandleIsEqual(frag->me_h,PTL_INVALID_HANDLE)) { frag->me_h = PTL_INVALID_HANDLE; } OPAL_THREAD_ADD_FETCH32(&portals4_btl->portals_outstanding_ops, -1);