@@ -121,7 +121,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
121
121
ompi_group_t * failed_group = NULL , * comm_group = NULL , * alive_group = NULL , * alive_rgroup = NULL ;
122
122
ompi_communicator_t * newcomp = NULL ;
123
123
int mode ;
124
+ #if OPAL_ENABLE_DEBUG
124
125
double start , stop ;
126
+ #endif
125
127
126
128
* newcomm = MPI_COMM_NULL ;
127
129
@@ -132,15 +134,21 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
132
134
OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
133
135
"%s ompi: comm_shrink: Agreement on failed processes" ,
134
136
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ) ));
137
+ #if OPAL_ENABLE_DEBUG
135
138
start = PMPI_Wtime ();
139
+ #endif
136
140
opal_mutex_lock (& ompi_group_afp_mutex );
137
141
ompi_group_intersection (comm -> c_remote_group , ompi_group_all_failed_procs , & failed_group );
138
142
opal_mutex_unlock (& ompi_group_afp_mutex );
143
+ #if OPAL_ENABLE_DEBUG
139
144
stop = PMPI_Wtime ();
145
+ #endif
140
146
OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
141
147
"%s ompi: comm_shrink: group_inter: %g seconds" ,
142
148
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
149
+ #if OPAL_ENABLE_DEBUG
143
150
start = PMPI_Wtime ();
151
+ #endif
144
152
do {
145
153
/* We need to create the list of alive processes. Thus, we don't care about
146
154
* the value of flag, instead we are only using the globally consistent
@@ -154,7 +162,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
154
162
comm ,
155
163
comm -> c_coll -> coll_agree_module );
156
164
} while ( MPI_ERR_PROC_FAILED == ret );
165
+ #if OPAL_ENABLE_DEBUG
157
166
stop = PMPI_Wtime ();
167
+ #endif
158
168
OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
159
169
"%s ompi: comm_shrink: AGREE: %g seconds" ,
160
170
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
@@ -171,7 +181,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
171
181
OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
172
182
"%s ompi: comm_shrink: Determine ranking for new communicator intra %d" ,
173
183
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), OMPI_COMM_IS_INTRA (comm )));
184
+ #if OPAL_ENABLE_DEBUG
174
185
start = PMPI_Wtime ();
186
+ #endif
175
187
176
188
/* Create 'alive' groups */
177
189
mode = OMPI_COMM_CID_INTRA_FT ;
@@ -210,7 +222,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
210
222
exit_status = MPI_ERR_INTERN ;
211
223
goto cleanup ;
212
224
}
225
+ #if OPAL_ENABLE_DEBUG
213
226
stop = PMPI_Wtime ();
227
+ #endif
214
228
OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
215
229
"%s ompi: comm_shrink: GRP COMPUTATION: %g seconds\n" ,
216
230
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
@@ -221,7 +235,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
221
235
OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
222
236
"%s ompi: comm_shrink: Determine context id" ,
223
237
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ) ));
238
+ #if OPAL_ENABLE_DEBUG
224
239
start = PMPI_Wtime ();
240
+ #endif
225
241
ret = ompi_comm_nextcid ( newcomp , /* new communicator */
226
242
comm , /* old comm */
227
243
NULL , /* bridge comm */
@@ -236,7 +252,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
236
252
exit_status = ret ;
237
253
goto cleanup ;
238
254
}
255
+ #if OPAL_ENABLE_DEBUG
239
256
stop = PMPI_Wtime ();
257
+ #endif
240
258
OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
241
259
"%s ompi: comm_shrink: NEXT CID: %g seconds\n" ,
242
260
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
@@ -248,7 +266,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
248
266
snprintf (newcomp -> c_name , MPI_MAX_OBJECT_NAME , "MPI COMMUNICATOR %d SHRUNK FROM %d" ,
249
267
ompi_comm_get_local_cid (newcomp ),
250
268
ompi_comm_get_local_cid (comm ));
269
+ #if OPAL_ENABLE_DEBUG
251
270
start = PMPI_Wtime ();
271
+ #endif
252
272
/* activate communicator and init coll-module */
253
273
ret = ompi_comm_activate ( & newcomp , /* new communicator */
254
274
comm ,
@@ -261,7 +281,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
261
281
exit_status = ret ;
262
282
goto cleanup ;
263
283
}
284
+ #if OPAL_ENABLE_DEBUG
264
285
stop = PMPI_Wtime ();
286
+ #endif
265
287
OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
266
288
"%s ompi: comm_shrink: COLL SELECT: %g seconds\n" ,
267
289
OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
0 commit comments