Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] MPI_Allreduce()
From: Ashley Pittman (apittman_at_[hidden])
Date: 2008-03-13 10:48:23


On Wed, 2008-03-12 at 18:05 -0400, Aurélien Bouteiller wrote:
> If you can avoid them it is better to avoid them. However it is always
> better to use a MPI_Alltoall than coding your own all to all with
> point to point, and in some algorithms you *need* to make a all to all
> communication. What you should understand by "avoid all to all" is not
> avoid MPI_alltoall, but choose a mathematic algorithm that does not
> need all to all.
>
> The algorithmic complexity of AllReduce is the same as AlltoAll.

I can't speak for Open-mpi but in the general case this probably isn't
true at least not in the context of how it's meant.

There are two obvious ways to implement AllReduce, either a Reduce/Bcast
combination or the butterfly algorithm. These are both harder to code
than a naive AlltoAll assuming you take into account implementing the
underlying Reduce if you do it that way however the complexity within
collectives is in minimising data contention and in this context I can't
think of anything which is harder than AlltoAll.

Ashley,