X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9e5e63d57ab1cfd5b17474ad297f722e48af6175..f54458a7bb43175fc8e22322bf8b36dd5af06969:/src/smpi/smpi_replay.c diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 686bb24a61..dc35a680d3 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -246,8 +246,18 @@ static void action_bcast(const char *const *action) { double size = parse_double(action[2]); double clock = smpi_process_simulated_elapsed(); +#ifdef HAVE_TRACING + int rank = smpi_comm_rank(MPI_COMM_WORLD); + TRACE_smpi_computing_out(rank); + int root_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), 0); + TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__); +#endif smpi_mpi_bcast(NULL, size, MPI_BYTE, 0, MPI_COMM_WORLD); +#ifdef HAVE_TRACING + TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__); + TRACE_smpi_computing_in(rank); +#endif XBT_VERB("%s %f", xbt_str_join_array(action, " "), smpi_process_simulated_elapsed()-clock); @@ -257,7 +267,17 @@ static void action_reduce(const char *const *action) { double size = parse_double(action[2]); double clock = smpi_process_simulated_elapsed(); - smpi_mpi_reduce(NULL, NULL, size, MPI_BYTE, MPI_OP_NULL, 0, MPI_COMM_WORLD); +#ifdef HAVE_TRACING + int rank = smpi_comm_rank(MPI_COMM_WORLD); + TRACE_smpi_computing_out(rank); + int root_traced = smpi_group_rank(smpi_comm_group(MPI_COMM_WORLD), 0); + TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__); +#endif + smpi_mpi_reduce(NULL, NULL, size, MPI_BYTE, MPI_OP_NULL, 0, MPI_COMM_WORLD); +#ifdef HAVE_TRACING + TRACE_smpi_collective_out(rank, root_traced, __FUNCTION__); + TRACE_smpi_computing_in(rank); +#endif XBT_VERB("%s %f", xbt_str_join_array(action, " "), smpi_process_simulated_elapsed()-clock);