A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change some behaviors with MPI_IN_PLACE
[simgrid.git]
/
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
2c6ab2d
..
a2a44ae
100644
(file)
--- 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;
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);
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
)
{
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);
return smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
root, comm);