On May 19, 2012, at 1:36 PM, Rohan Deshpande wrote:
> I am not understanding how MPI_Reduce would be useful.
> Say I have 3 processes and each process has array [1,2,3,4]
> When each process calculates the prefix sum using cuda each process will have array as [1,3,6,10]
> so if I use MPI_Reduce to gather results it returns me sum as 30.
> but the original array is [1,2,3,4,1,2,3,4,1,2,3,4] and the prefix sum of this array should be
> Is my understanding wrong somewhere?
If that is the operation you are looking for, then MPI_Scan is sufficient.
Your original email was somewhat cryptic; the phrase "When each task returns its result (which would be array) master task needs to combine all the results to get the final result." led me to believe that you might just need MPI_Reduce, instead.
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/