Skip to content

Commit

Permalink
Merge pull request #6566 from davideberius/name_fix
Browse files Browse the repository at this point in the history
Component: Changes
  • Loading branch information
jsquyres authored Apr 9, 2019
2 parents fd686d7 + 461d8bc commit 9bb8fd5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ompi/runtime/ompi_spc.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static void ompi_spc_dump(void);
OMPI_DECLSPEC int mpi_t_offset = -1;
OMPI_DECLSPEC bool mpi_t_enabled = false;

OPAL_DECLSPEC ompi_communicator_t *comm = NULL;
OPAL_DECLSPEC ompi_communicator_t *ompi_spc_comm = NULL;

typedef struct ompi_spc_event_t {
const char* counter_name;
Expand Down Expand Up @@ -268,7 +268,7 @@ void ompi_spc_events_init(void)
ompi_spc_events[i].value = 0;
}

ompi_comm_dup(&ompi_mpi_comm_world.comm, &comm);
ompi_comm_dup(&ompi_mpi_comm_world.comm, &ompi_spc_comm);
}

/* Initializes the SPC data structures and registers all counters as MPI_T pvars.
Expand Down Expand Up @@ -353,8 +353,8 @@ static void ompi_spc_dump(void)
int i, j, world_size, offset;
long long *recv_buffer = NULL, *send_buffer;

int rank = ompi_comm_rank(comm);
world_size = ompi_comm_size(comm);
int rank = ompi_comm_rank(ompi_spc_comm);
world_size = ompi_comm_size(ompi_spc_comm);

/* Convert from cycles to usecs before sending */
for(i = 0; i < OMPI_SPC_NUM_COUNTERS; i++) {
Expand All @@ -381,10 +381,10 @@ static void ompi_spc_dump(void)
return;
}
}
(void)comm->c_coll->coll_gather(send_buffer, OMPI_SPC_NUM_COUNTERS, MPI_LONG_LONG,
recv_buffer, OMPI_SPC_NUM_COUNTERS, MPI_LONG_LONG,
0, comm,
comm->c_coll->coll_gather_module);
(void)ompi_spc_comm->c_coll->coll_gather(send_buffer, OMPI_SPC_NUM_COUNTERS, MPI_LONG_LONG,
recv_buffer, OMPI_SPC_NUM_COUNTERS, MPI_LONG_LONG,
0, ompi_spc_comm,
ompi_spc_comm->c_coll->coll_gather_module);

/* Once rank 0 has all of the information, print the aggregated counter values for each rank in order */
if(rank == 0) {
Expand All @@ -410,7 +410,7 @@ static void ompi_spc_dump(void)
}
free(send_buffer);

comm->c_coll->coll_barrier(comm, comm->c_coll->coll_barrier_module);
ompi_spc_comm->c_coll->coll_barrier(ompi_spc_comm, ompi_spc_comm->c_coll->coll_barrier_module);
}

/* Frees any dynamically alocated OMPI SPC data structures */
Expand All @@ -421,7 +421,7 @@ void ompi_spc_fini(void)
}

free(ompi_spc_events); ompi_spc_events = NULL;
ompi_comm_free(&comm);
ompi_comm_free(&ompi_spc_comm);
}

/* Records an update to a counter using an atomic add operation. */
Expand Down

0 comments on commit 9bb8fd5

Please sign in to comment.