@@ -135,24 +135,46 @@ static void opal_common_ucx_mca_fence_complete_cb(int status, void *fenced)
135
135
* (int * )fenced = 1 ;
136
136
}
137
137
138
- void opal_common_ucx_mca_proc_added (void )
139
- {
140
138
#if HAVE_DECL_UCM_TEST_EVENTS
139
+ static ucs_status_t opal_common_ucx_mca_test_external_events (int events )
140
+ {
141
+ #if HAVE_DECL_UCM_TEST_EXTERNAL_EVENTS
142
+ return ucm_test_external_events (UCM_EVENT_VM_UNMAPPED );
143
+ #else
144
+ return ucm_test_events (UCM_EVENT_VM_UNMAPPED );
145
+ #endif
146
+ }
147
+
148
+ static void opal_common_ucx_mca_test_events (void )
149
+ {
141
150
static int warned = 0 ;
142
- static char * mem_hooks_suggestion = "Pls try adding --mca opal_common_ucx_opal_mem_hooks 1 "
143
- "to mpirun/oshrun command line to resolve this issue." ;
151
+ const char * suggestion ;
144
152
ucs_status_t status ;
145
153
146
154
if (!warned ) {
147
- status = ucm_test_events (UCM_EVENT_VM_UNMAPPED );
155
+ if (opal_common_ucx .opal_mem_hooks ) {
156
+ suggestion = "Please check OPAL memory events infrastructure." ;
157
+ status = opal_common_ucx_mca_test_external_events (UCM_EVENT_VM_UNMAPPED );
158
+ } else {
159
+ suggestion = "Pls try adding --mca opal_common_ucx_opal_mem_hooks 1 "
160
+ "to mpirun/oshrun command line to resolve this issue." ;
161
+ status = ucm_test_events (UCM_EVENT_VM_UNMAPPED );
162
+ }
163
+
148
164
if (status != UCS_OK ) {
149
165
MCA_COMMON_UCX_WARN ("UCX is unable to handle VM_UNMAP event. "
150
166
"This may cause performance degradation or data "
151
- "corruption. %s" ,
152
- opal_common_ucx .opal_mem_hooks ? "" : mem_hooks_suggestion );
167
+ "corruption. %s" , suggestion );
153
168
warned = 1 ;
154
169
}
155
170
}
171
+ }
172
+ #endif
173
+
174
+ void opal_common_ucx_mca_proc_added (void )
175
+ {
176
+ #if HAVE_DECL_UCM_TEST_EVENTS
177
+ opal_common_ucx_mca_test_events ();
156
178
#endif
157
179
}
158
180
0 commit comments