@@ -23,7 +23,7 @@ static void ompi_spc_dump(void);
23
23
OMPI_DECLSPEC int mpi_t_offset = -1 ;
24
24
OMPI_DECLSPEC bool mpi_t_enabled = false;
25
25
26
- OPAL_DECLSPEC ompi_communicator_t * comm = NULL ;
26
+ OPAL_DECLSPEC ompi_communicator_t * ompi_spc_comm = NULL ;
27
27
28
28
typedef struct ompi_spc_event_t {
29
29
const char * counter_name ;
@@ -268,7 +268,7 @@ void ompi_spc_events_init(void)
268
268
ompi_spc_events [i ].value = 0 ;
269
269
}
270
270
271
- ompi_comm_dup (& ompi_mpi_comm_world .comm , & comm );
271
+ ompi_comm_dup (& ompi_mpi_comm_world .comm , & ompi_spc_comm );
272
272
}
273
273
274
274
/* Initializes the SPC data structures and registers all counters as MPI_T pvars.
@@ -353,8 +353,8 @@ static void ompi_spc_dump(void)
353
353
int i , j , world_size , offset ;
354
354
long long * recv_buffer = NULL , * send_buffer ;
355
355
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 );
358
358
359
359
/* Convert from cycles to usecs before sending */
360
360
for (i = 0 ; i < OMPI_SPC_NUM_COUNTERS ; i ++ ) {
@@ -381,10 +381,10 @@ static void ompi_spc_dump(void)
381
381
return ;
382
382
}
383
383
}
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 );
388
388
389
389
/* Once rank 0 has all of the information, print the aggregated counter values for each rank in order */
390
390
if (rank == 0 ) {
@@ -410,7 +410,7 @@ static void ompi_spc_dump(void)
410
410
}
411
411
free (send_buffer );
412
412
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 );
414
414
}
415
415
416
416
/* Frees any dynamically alocated OMPI SPC data structures */
@@ -421,7 +421,7 @@ void ompi_spc_fini(void)
421
421
}
422
422
423
423
free (ompi_spc_events ); ompi_spc_events = NULL ;
424
- ompi_comm_free (& comm );
424
+ ompi_comm_free (& ompi_spc_comm );
425
425
}
426
426
427
427
/* Records an update to a counter using an atomic add operation. */
0 commit comments