@@ -121,7 +121,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
121121 ompi_group_t * failed_group = NULL , * comm_group = NULL , * alive_group = NULL , * alive_rgroup = NULL ;
122122 ompi_communicator_t * newcomp = NULL ;
123123 int mode ;
124+ #if OPAL_ENABLE_DEBUG
124125 double start , stop ;
126+ #endif
125127
126128 * newcomm = MPI_COMM_NULL ;
127129
@@ -132,15 +134,21 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
132134 OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
133135 "%s ompi: comm_shrink: Agreement on failed processes" ,
134136 OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ) ));
137+ #if OPAL_ENABLE_DEBUG
135138 start = PMPI_Wtime ();
139+ #endif
136140 opal_mutex_lock (& ompi_group_afp_mutex );
137141 ompi_group_intersection (comm -> c_remote_group , ompi_group_all_failed_procs , & failed_group );
138142 opal_mutex_unlock (& ompi_group_afp_mutex );
143+ #if OPAL_ENABLE_DEBUG
139144 stop = PMPI_Wtime ();
145+ #endif
140146 OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
141147 "%s ompi: comm_shrink: group_inter: %g seconds" ,
142148 OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
149+ #if OPAL_ENABLE_DEBUG
143150 start = PMPI_Wtime ();
151+ #endif
144152 do {
145153 /* We need to create the list of alive processes. Thus, we don't care about
146154 * 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
154162 comm ,
155163 comm -> c_coll -> coll_agree_module );
156164 } while ( MPI_ERR_PROC_FAILED == ret );
165+ #if OPAL_ENABLE_DEBUG
157166 stop = PMPI_Wtime ();
167+ #endif
158168 OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
159169 "%s ompi: comm_shrink: AGREE: %g seconds" ,
160170 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
171181 OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
172182 "%s ompi: comm_shrink: Determine ranking for new communicator intra %d" ,
173183 OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), OMPI_COMM_IS_INTRA (comm )));
184+ #if OPAL_ENABLE_DEBUG
174185 start = PMPI_Wtime ();
186+ #endif
175187
176188 /* Create 'alive' groups */
177189 mode = OMPI_COMM_CID_INTRA_FT ;
@@ -210,7 +222,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
210222 exit_status = MPI_ERR_INTERN ;
211223 goto cleanup ;
212224 }
225+ #if OPAL_ENABLE_DEBUG
213226 stop = PMPI_Wtime ();
227+ #endif
214228 OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
215229 "%s ompi: comm_shrink: GRP COMPUTATION: %g seconds\n" ,
216230 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
221235 OPAL_OUTPUT_VERBOSE ((5 , ompi_ftmpi_output_handle ,
222236 "%s ompi: comm_shrink: Determine context id" ,
223237 OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ) ));
238+ #if OPAL_ENABLE_DEBUG
224239 start = PMPI_Wtime ();
240+ #endif
225241 ret = ompi_comm_nextcid ( newcomp , /* new communicator */
226242 comm , /* old comm */
227243 NULL , /* bridge comm */
@@ -236,7 +252,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
236252 exit_status = ret ;
237253 goto cleanup ;
238254 }
255+ #if OPAL_ENABLE_DEBUG
239256 stop = PMPI_Wtime ();
257+ #endif
240258 OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
241259 "%s ompi: comm_shrink: NEXT CID: %g seconds\n" ,
242260 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
248266 snprintf (newcomp -> c_name , MPI_MAX_OBJECT_NAME , "MPI COMMUNICATOR %d SHRUNK FROM %d" ,
249267 ompi_comm_get_local_cid (newcomp ),
250268 ompi_comm_get_local_cid (comm ));
269+ #if OPAL_ENABLE_DEBUG
251270 start = PMPI_Wtime ();
271+ #endif
252272 /* activate communicator and init coll-module */
253273 ret = ompi_comm_activate ( & newcomp , /* new communicator */
254274 comm ,
@@ -261,7 +281,9 @@ int ompi_comm_shrink_internal(ompi_communicator_t* comm, ompi_communicator_t** n
261281 exit_status = ret ;
262282 goto cleanup ;
263283 }
284+ #if OPAL_ENABLE_DEBUG
264285 stop = PMPI_Wtime ();
286+ #endif
265287 OPAL_OUTPUT_VERBOSE ((10 , ompi_ftmpi_output_handle ,
266288 "%s ompi: comm_shrink: COLL SELECT: %g seconds\n" ,
267289 OMPI_NAME_PRINT (OMPI_PROC_MY_NAME ), stop - start ));
0 commit comments