File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ int opal_common_ofi_export_memory_monitor(void)
121121 int ret = - FI_ENOSYS ;
122122
123123#ifdef HAVE_STRUCT_FI_OPS_MEM_MONITOR
124+ bool memory_base_frame_open = false;
124125 OPAL_THREAD_LOCK (& opal_common_ofi_mutex );
125126
126127 if (NULL != opal_common_ofi_cache_fid ) {
@@ -145,7 +146,10 @@ int opal_common_ofi_export_memory_monitor(void)
145146 if (OPAL_SUCCESS != ret ) {
146147 ret = - FI_ENOSYS ;
147148 goto err ;
149+ } else {
150+ memory_base_frame_open = true;
148151 }
152+
149153 if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT )
150154 != (((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ))
151155 & opal_mem_hooks_support_level ())) {
@@ -190,6 +194,9 @@ int opal_common_ofi_export_memory_monitor(void)
190194 free (opal_common_ofi_monitor );
191195 }
192196
197+ if (memory_base_frame_open ) {
198+ mca_base_framework_close (& opal_memory_base_framework );
199+ }
193200 opal_common_ofi_installed_memory_monitor = false;
194201 }
195202
You can’t perform that action at this time.
0 commit comments