I am new in MPI I have some arrays generated by processors. Each processor generated one array with DIFFERENT length. How can I merging all of them IN ORDER in to one array only stored in processor 0.
Eg:
Processor 0: [1 1 1]
Processor 1: [2 2 2]
Processor 2: [3 3 3 3 3]
And my expected result is [1 1 1 2 2 2 3 3 3 3 3], not [1 1 1 3 3 3 3 3 2 2 2]
Is there anyone can help me solve this problem. Thank for reading :)