X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8293a833f9c68986f8bd174d5bf3d04eb62918d7..cd9affe6152d6bbec19a72ea6fe26ab9407b51b7:/src/smpi/colls/smpi_mpich_selector.c diff --git a/src/smpi/colls/smpi_mpich_selector.c b/src/smpi/colls/smpi_mpich_selector.c index c95613598f..a43b6d8214 100644 --- a/src/smpi/colls/smpi_mpich_selector.c +++ b/src/smpi/colls/smpi_mpich_selector.c @@ -1,6 +1,6 @@ /* selector for collective algorithms based on mpich decision logic */ -/* Copyright (c) 2009, 2010. The SimGrid Team. +/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -74,7 +74,7 @@ int smpi_coll_tuned_allreduce_mpich(void *sbuf, void *rbuf, int count, if (block_dsize > large_message && count >= pof2 && smpi_op_is_commute(op)) { //for long messages - return (smpi_coll_tuned_allreduce_rab_rsag (sbuf, rbuf, + return (smpi_coll_tuned_allreduce_rab_rdb (sbuf, rbuf, count, dtype, op, comm)); }else { @@ -167,7 +167,7 @@ int smpi_coll_tuned_alltoall_mpich( void *sbuf, int scount, comm); } else if (block_dsize < medium_size) { - return smpi_coll_tuned_alltoall_simple(sbuf, scount, sdtype, + return smpi_coll_tuned_alltoall_basic_linear(sbuf, scount, sdtype, rbuf, rcount, rdtype, comm); }else if (communicator_size%2){ @@ -176,7 +176,7 @@ int smpi_coll_tuned_alltoall_mpich( void *sbuf, int scount, comm); } - return smpi_coll_tuned_alltoall_pair (sbuf, scount, sdtype, + return smpi_coll_tuned_alltoall_ring (sbuf, scount, sdtype, rbuf, rcount, rdtype, comm); } @@ -424,20 +424,17 @@ int smpi_coll_tuned_reduce_scatter_mpich( void *sbuf, void *rbuf, ) { int comm_size, i; - size_t total_message_size, dsize; - int zerocounts = 0; + size_t total_message_size; + + if(sbuf==rbuf)sbuf=MPI_IN_PLACE; //restore MPI_IN_PLACE as these algorithms handle it XBT_DEBUG("smpi_coll_tuned_reduce_scatter_mpich"); comm_size = smpi_comm_size(comm); // We need data size for decision function - dsize=smpi_datatype_size(dtype); total_message_size = 0; for (i = 0; i < comm_size; i++) { total_message_size += rcounts[i]; - if (0 == rcounts[i]) { - zerocounts = 1; - } } if( smpi_op_is_commute(op) && total_message_size > 524288) { @@ -600,15 +597,18 @@ int smpi_coll_tuned_allgatherv_mpich(void *sbuf, int scount, MPI_Comm comm ) { - int communicator_size, pow2_size; - size_t dsize, total_dsize; + int communicator_size, pow2_size,i; + size_t total_dsize; communicator_size = smpi_comm_size(comm); /* Determine complete data size */ - dsize=smpi_datatype_size(sdtype); - total_dsize = dsize * scount * communicator_size; - + total_dsize = 0; + for (i=0; i