X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/54f3e8ef2b6a97e765f395cfdead327fb0989c5f..db17323a11a3089f492c2cae1be7913673689d5c:/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 2c6ab2dc40..a2a44ae779 100644 --- a/src/smpi/colls/smpi_mpich_selector.c +++ b/src/smpi/colls/smpi_mpich_selector.c @@ -426,6 +426,8 @@ int smpi_coll_tuned_reduce_scatter_mpich( void *sbuf, void *rbuf, int comm_size, i; size_t total_message_size; + if(sbuf==rbuf)sbuf=MPI_IN_PLACE; //restore MPI_IN_PLACE as these algos handle it + XBT_DEBUG("smpi_coll_tuned_reduce_scatter_mpich"); comm_size = smpi_comm_size(comm); @@ -689,6 +691,11 @@ int smpi_coll_tuned_scatter_mpich(void *sbuf, int scount, int root, MPI_Comm comm ) { + if(smpi_comm_rank(comm)!=root){ + sbuf=xbt_malloc(rcount*smpi_datatype_get_extent(rdtype)); + scount=rcount; + sdtype=rdtype; + } return smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);