Skip to content

Commit 3e1dd36

Browse files
committed
btl/uct: check for support before disabling UCX memory hooks
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
1 parent 7fe5c54 commit 3e1dd36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

opal/mca/btl/uct/btl_uct_component.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
1818
* Copyright (c) 2018 Triad National Security, LLC. All rights
1919
* reserved.
20+
* Copyright (c) 2019 Google, LLC. All rights reserved.
2021
* $COPYRIGHT$
2122
*
2223
* Additional copyrights may follow
@@ -129,7 +130,10 @@ static int mca_btl_uct_component_open(void)
129130
mca_btl_uct_component.num_contexts_per_module = MCA_BTL_UCT_MAX_WORKERS;
130131
}
131132

132-
if (mca_btl_uct_component.disable_ucx_memory_hooks) {
133+
if (mca_btl_uct_component.disable_ucx_memory_hooks &&
134+
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
135+
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) &
136+
opal_mem_hooks_support_level()))) {
133137
ucm_set_external_event(UCM_EVENT_VM_UNMAPPED);
134138
opal_mem_hooks_register_release(mca_btl_uct_mem_release_cb, NULL);
135139
}

0 commit comments

Comments
 (0)