I use MPI in C. I was able to distribute the parts of the array to different processors. And different processors did all the manipulations I wanted. Now I am at the point where I wanted to combine all the subarrays that are in all processors into one large array. For example, if different processors had subtasks as follows:
Processor 1: 0 1 1 0 0 0 1 0 Processor 2: 0 0 1 0 1 1 0 1 Processor 3: 1 1 0 0 1 1 1 1 ...
I want to merge or merge all subarrays together. For example, I would like a large array to be:
0 1 1 0 0 0 1 0 0 0 1 0 1 1 0 1 1 1 0 0 1 1 1 1 ...
I tried to use MPI_Reduce, but I could not find the operation to do what I wanted to do. Is there any other MPI method that I could use to achieve what I'm looking for?
source share