I have split MPI_COMM_WORLD into two sub-communicators and I want to transfer an array of data distributed over MPI_COMM_WORLD to two sub-communicators. What is the best way to do that within MPI-1.1?
For example, there is an array A = [1 2 3 4 5 6 7 8]
distributed among four MPI processes in MPI_COMM_WORLD as follows
rank 0: [1 2]
rank 1: [3 4]
rank 2: [5 6]
rank 3: [7 8]
I split MPI_COMM_WORLD into two sub-communicators constsing of two MPI processes each and want to have my data being like:
subcommunicator1:
rank 0: [1 2 3 4]
rank 1: [5 6 7 8]
subcommunicator2:
rank 0: [1 2 3 4]
rank 1: [5 6 7 8]