Skip to content

Commit 76f01b9

Browse files
authored
Merge pull request #6696 from gpaulsen/topic/v4.0.x/btl_uct_from_6668
btl/uct: check for support before disabling UCX memory hooks
2 parents 3fd5c84 + 11cb0f2 commit 76f01b9

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
@@ -127,7 +128,10 @@ static int mca_btl_uct_component_open(void)
127128
mca_btl_uct_component.num_contexts_per_module = MCA_BTL_UCT_MAX_WORKERS;
128129
}
129130

130-
if (mca_btl_uct_component.disable_ucx_memory_hooks) {
131+
if (mca_btl_uct_component.disable_ucx_memory_hooks &&
132+
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
133+
((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) &
134+
opal_mem_hooks_support_level()))) {
131135
ucm_set_external_event(UCM_EVENT_VM_UNMAPPED);
132136
opal_mem_hooks_register_release(mca_btl_uct_mem_release_cb, NULL);
133137
}

0 commit comments

Comments
 (0)