File tree 1 file changed +7
-0
lines changed 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)
121
121
int ret = - FI_ENOSYS ;
122
122
123
123
#ifdef HAVE_STRUCT_FI_OPS_MEM_MONITOR
124
+ bool memory_base_frame_open = false;
124
125
OPAL_THREAD_LOCK (& opal_common_ofi_mutex );
125
126
126
127
if (NULL != opal_common_ofi_cache_fid ) {
@@ -145,7 +146,10 @@ int opal_common_ofi_export_memory_monitor(void)
145
146
if (OPAL_SUCCESS != ret ) {
146
147
ret = - FI_ENOSYS ;
147
148
goto err ;
149
+ } else {
150
+ memory_base_frame_open = true;
148
151
}
152
+
149
153
if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT )
150
154
!= (((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT ))
151
155
& opal_mem_hooks_support_level ())) {
@@ -190,6 +194,9 @@ int opal_common_ofi_export_memory_monitor(void)
190
194
free (opal_common_ofi_monitor );
191
195
}
192
196
197
+ if (memory_base_frame_open ) {
198
+ mca_base_framework_close (& opal_memory_base_framework );
199
+ }
193
200
opal_common_ofi_installed_memory_monitor = false;
194
201
}
195
202
You can’t perform that action at this time.
0 commit comments