From: suter Date: Fri, 21 Dec 2012 13:34:17 +0000 (+0100) Subject: first try at replaying alltoall. Not tested yet X-Git-Tag: v3_9_rc1~86^2~59 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8eef701b3f5d22a51d90de7b17145833518d4570?ds=sidebyside first try at replaying alltoall. Not tested yet --- diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 77b059c5f6..843129146a 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -317,6 +317,34 @@ static void action_allReduce(const char *const *action) { static void action_allToAll(const char *const *action) { double clock = smpi_process_simulated_elapsed(); + double comm_size = smpi_comm_size(MPI_COMM_WORLD); + double send_size = parse_double(action[2]); + double recv_size = parse_double(action[3]); + +#ifdef HAVE_TRACING + int rank = smpi_process_index(); + TRACE_smpi_computing_out(rank); + TRACE_smpi_collective_in(rank, -1, __FUNCTION__); +#endif + + if (send_size < 200 && comm_size > 12) { + smpi_coll_tuned_alltoall_bruck(NULL, send_size, MPI_BYTE, + NULL, recv_size, MPI_BYTE, + MPI_COMM_WORLD); + } else if (send_size < 3000) { + smpi_coll_tuned_alltoall_basic_linear(NULL, send_size, MPI_BYTE, + NULL, recv_size, MPI_BYTE, + MPI_COMM_WORLD); + } else { + smpi_coll_tuned_alltoall_pairwise(NULL, send_size, MPI_BYTE, + NULL, recv_size, MPI_BYTE, + MPI_COMM_WORLD); + } + +#ifdef HAVE_TRACING + TRACE_smpi_collective_out(rank, -1, __FUNCTION__); + TRACE_smpi_computing_in(rank); +#endif log_timed_action (action, clock); }