<div class="gmail_quote">On Sun, Jan 15, 2012 at 08:53, Bharath Pattabiraman <span dir="ltr"><<a href="mailto:bharath650@gmail.com">bharath650@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am wondering what would be the best way to do prefix sum in the reverse direction (cumulative sum from n to 1) on a distributed array. I understand MPI_Scan does it, but couldnt figure out how to adapt it for my case.</blockquote>
</div><br><div>You could make a communicator with the ranks permuted (likely excessive) or you could do both MPI_Allreduce and MPI_Scan, then subtract (easy).</div>