@@ -91,23 +91,23 @@ OPAL_DECLSPEC void opal_common_ucx_mca_register(void)
9191 opal_common_ucx .output = opal_output_open (NULL );
9292 opal_output_set_verbosity (opal_common_ucx .output , opal_common_ucx .verbose );
9393
94- ret = mca_base_framework_open (& opal_memory_base_framework , 0 );
95- if (OPAL_SUCCESS != ret ) {
96- /* failed to initialize memory framework - just exit */
97- MCA_COMMON_UCX_VERBOSE (1 , "failed to initialize memory base framework: %d, "
98- "memory hooks will not be used" , ret );
99- return ;
100- }
101-
10294 /* Set memory hooks */
103- if (opal_common_ucx .opal_mem_hooks &&
104- (OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ) ==
105- ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ) &
106- opal_mem_hooks_support_level ()))
107- {
108- MCA_COMMON_UCX_VERBOSE (1 , "%s" , "using OPAL memory hooks as external events" );
109- ucm_set_external_event (UCM_EVENT_VM_UNMAPPED );
110- opal_mem_hooks_register_release (opal_common_ucx_mem_release_cb , NULL );
95+ if (opal_common_ucx .opal_mem_hooks ) {
96+ ret = mca_base_framework_open (& opal_memory_base_framework , 0 );
97+ if (OPAL_SUCCESS != ret ) {
98+ /* failed to initialize memory framework - just exit */
99+ MCA_COMMON_UCX_VERBOSE (1 , "failed to initialize memory base framework: %d, "
100+ "memory hooks will not be used" , ret );
101+ return ;
102+ }
103+
104+ if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ) ==
105+ ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ) &
106+ opal_mem_hooks_support_level ())) {
107+ MCA_COMMON_UCX_VERBOSE (1 , "%s" , "using OPAL memory hooks as external events" );
108+ ucm_set_external_event (UCM_EVENT_VM_UNMAPPED );
109+ opal_mem_hooks_register_release (opal_common_ucx_mem_release_cb , NULL );
110+ }
111111 }
112112}
113113
@@ -194,7 +194,6 @@ OPAL_DECLSPEC int opal_common_ucx_del_procs_nofence(opal_common_ucx_del_proc_t *
194194 void * dreq , * * dreqs ;
195195 size_t i ;
196196 size_t n ;
197- int ret = OPAL_SUCCESS ;
198197
199198 MCA_COMMON_UCX_ASSERT (procs || !count );
200199 MCA_COMMON_UCX_ASSERT (max_disconnect > 0 );
0 commit comments