From 2fb1a5e1b2ad2948c750bed2ea62c1eb1a7c4fa9 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Wed, 5 Sep 2018 11:36:11 -0600 Subject: [PATCH] btl/uct: add missing opal_mem_hooks_unregister_release call This commit fixes a bug when using the UCT btl with the UCX memory hooks disabled. We were misssing a call to opal_mem_hooks_unregister_release to remove the btl memory hook callback. Signed-off-by: Nathan Hjelm (cherry picked from commit 36c206d2d616578c97853d1d69727a1d6e165c1e) Signed-off-by: Nathan Hjelm --- opal/mca/btl/uct/btl_uct_module.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/opal/mca/btl/uct/btl_uct_module.c b/opal/mca/btl/uct/btl_uct_module.c index aa69ebb73c..b1b659b23b 100644 --- a/opal/mca/btl/uct/btl_uct_module.c +++ b/opal/mca/btl/uct/btl_uct_module.c @@ -288,6 +288,10 @@ int mca_btl_uct_finalize (mca_btl_base_module_t* btl) mca_btl_uct_endpoint_t *endpoint; uint64_t key; + if (mca_btl_uct_component.disable_ucx_memory_hooks) { + opal_mem_hooks_unregister_release (mca_btl_uct_mem_release_cb); + } + /* clean up any leftover endpoints */ OPAL_HASH_TABLE_FOREACH(key, uint64, endpoint, &uct_module->id_to_endpoint) { OBJ_RELEASE(endpoint);