@@ -23,7 +23,7 @@ static void ompi_spc_dump(void);
2323OMPI_DECLSPEC int mpi_t_offset = -1 ;
2424OMPI_DECLSPEC bool mpi_t_enabled = false;
2525
26- OPAL_DECLSPEC ompi_communicator_t * comm = NULL ;
26+ OPAL_DECLSPEC ompi_communicator_t * ompi_spc_comm = NULL ;
2727
2828typedef struct ompi_spc_event_t {
2929 const char * counter_name ;
@@ -268,7 +268,7 @@ void ompi_spc_events_init(void)
268268 ompi_spc_events [i ].value = 0 ;
269269 }
270270
271- ompi_comm_dup (& ompi_mpi_comm_world .comm , & comm );
271+ ompi_comm_dup (& ompi_mpi_comm_world .comm , & ompi_spc_comm );
272272}
273273
274274/* Initializes the SPC data structures and registers all counters as MPI_T pvars.
@@ -353,8 +353,8 @@ static void ompi_spc_dump(void)
353353 int i , j , world_size , offset ;
354354 long long * recv_buffer = NULL , * send_buffer ;
355355
356- int rank = ompi_comm_rank (comm );
357- world_size = ompi_comm_size (comm );
356+ int rank = ompi_comm_rank (ompi_spc_comm );
357+ world_size = ompi_comm_size (ompi_spc_comm );
358358
359359 /* Convert from cycles to usecs before sending */
360360 for (i = 0 ; i < OMPI_SPC_NUM_COUNTERS ; i ++ ) {
@@ -381,10 +381,10 @@ static void ompi_spc_dump(void)
381381 return ;
382382 }
383383 }
384- (void )comm -> c_coll -> coll_gather (send_buffer , OMPI_SPC_NUM_COUNTERS , MPI_LONG_LONG ,
385- recv_buffer , OMPI_SPC_NUM_COUNTERS , MPI_LONG_LONG ,
386- 0 , comm ,
387- comm -> c_coll -> coll_gather_module );
384+ (void )ompi_spc_comm -> c_coll -> coll_gather (send_buffer , OMPI_SPC_NUM_COUNTERS , MPI_LONG_LONG ,
385+ recv_buffer , OMPI_SPC_NUM_COUNTERS , MPI_LONG_LONG ,
386+ 0 , ompi_spc_comm ,
387+ ompi_spc_comm -> c_coll -> coll_gather_module );
388388
389389 /* Once rank 0 has all of the information, print the aggregated counter values for each rank in order */
390390 if (rank == 0 ) {
@@ -410,7 +410,7 @@ static void ompi_spc_dump(void)
410410 }
411411 free (send_buffer );
412412
413- comm -> c_coll -> coll_barrier (comm , comm -> c_coll -> coll_barrier_module );
413+ ompi_spc_comm -> c_coll -> coll_barrier (ompi_spc_comm , ompi_spc_comm -> c_coll -> coll_barrier_module );
414414}
415415
416416/* Frees any dynamically alocated OMPI SPC data structures */
@@ -421,7 +421,7 @@ void ompi_spc_fini(void)
421421 }
422422
423423 free (ompi_spc_events ); ompi_spc_events = NULL ;
424- ompi_comm_free (& comm );
424+ ompi_comm_free (& ompi_spc_comm );
425425}
426426
427427/* Records an update to a counter using an atomic add operation. */
0 commit comments