comm);
}
- return smpi_coll_tuned_alltoall_pair (sbuf, scount, sdtype,
+ return smpi_coll_tuned_alltoall_ompi_pairwise (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
comm);
}
)
{
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 algos 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) {
MPI_Comm comm
)
{
- int communicator_size, pow2_size;
+ int communicator_size, pow2_size,i;
size_t dsize, 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<communicator_size; i++)
+ total_dsize += rcounts[i];
+ if (total_dsize == 0) return MPI_SUCCESS;
+
for (pow2_size = 1; pow2_size < communicator_size; pow2_size <<=1);
if ((pow2_size == communicator_size) && (total_dsize < 524288)) {
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);