Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
portals4: use PtlHandleIsEqual() to compare handles - more fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Kordenbrock <thkgcode@gmail.com>
tkordenbrock committed Jul 30, 2024
1 parent 526b0a3 commit cefee2e
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ompi/mca/mtl/portals4/mtl_portals4_cancel.c
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ ompi_mtl_portals4_cancel(struct mca_mtl_base_module_t* mtl,
receive completion event... */
ompi_mtl_portals4_progress();

if (PTL_INVALID_HANDLE != recvreq->me_h) {
if (!PtlHandleIsEqual(recvreq->me_h, PTL_INVALID_HANDLE)) {
ret = PtlMEUnlink(recvreq->me_h);
if (PTL_OK == ret) {
recvreq->super.super.ompi_req->req_status._cancelled = true;
2 changes: 1 addition & 1 deletion ompi/mca/mtl/portals4/mtl_portals4_recv_short.c
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@ ompi_mtl_portals4_recv_short_block_alloc(bool release_on_free)
static int
ompi_mtl_portals4_recv_short_block_free(ompi_mtl_portals4_recv_short_block_t *block)
{
if (PTL_INVALID_HANDLE != block->me_h) {
if (!PtlHandleIsEqual(block->me_h, PTL_INVALID_HANDLE)) {
PtlMEUnlink(block->me_h);
block->me_h = PTL_INVALID_HANDLE;
}
8 changes: 4 additions & 4 deletions ompi/mca/osc/portals4/osc_portals4_component.c
Original file line number Diff line number Diff line change
@@ -615,10 +615,10 @@ component_select(struct ompi_win_t *win, void **base, size_t size, ptrdiff_t dis

error:
/* BWB: FIX ME: This is all wrong... */
if (0 != module->ct_h) PtlCTFree(module->ct_h);
if (0 != module->data_me_h) PtlMEUnlink(module->data_me_h);
if (0 != module->req_md_h) PtlMDRelease(module->req_md_h);
if (0 != module->md_h) PtlMDRelease(module->md_h);
if (!PtlHandleIsEqual(module->ct_h, PTL_INVALID_HANDLE)) PtlCTFree(module->ct_h);
if (!PtlHandleIsEqual(module->data_me_h, PTL_INVALID_HANDLE)) PtlMEUnlink(module->data_me_h);
if (!PtlHandleIsEqual(module->req_md_h, PTL_INVALID_HANDLE)) PtlMDRelease(module->req_md_h);
if (!PtlHandleIsEqual(module->md_h, PTL_INVALID_HANDLE)) PtlMDRelease(module->md_h);
if (NULL != module->comm) ompi_comm_free(&module->comm);
if (NULL != module) free(module);

2 changes: 1 addition & 1 deletion opal/mca/btl/portals4/btl_portals4_frag.c
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ static void mca_btl_portals4_frag_eager_constructor(mca_btl_portals4_frag_t *fra

static void mca_btl_portals4_frag_eager_destructor(mca_btl_portals4_frag_t *frag)
{
if (PTL_INVALID_HANDLE != frag->me_h) {
if (!PtlHandleIsEqual(frag->me_h, PTL_INVALID_HANDLE)) {
PtlMEUnlink(frag->me_h);
frag->me_h = PTL_INVALID_HANDLE;
}

0 comments on commit cefee2e

Please sign in to comment.