LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Mathieu FREMONT (mathieu.fremont_at_[hidden])
Date: 2005-11-15 13:21:18


Hi,
I'm looking at an example bundled with source : PI calculation.

--
MPI::COMM_WORLD.Bcast(&n, 1, MPI::INT, 0);
/* ... */
// Combine all the partial results
MPI::COMM_WORLD.Reduce(&mypi, &pi, 1, MPI::DOUBLE, MPI::SUM, 0);
--
A I have a simple question : in this case, results are combined (reduced) on all the computers ? It means that all the computers on the ring are doing the adition of the results, even if the result was queried by the #0 ? How to avoid wasting sutch processor time ?
Thanks
Mathieu