To generalize my question, Let's say I have a small cluster consist of 9 nodes that are aligned in a 3*3 matrix:
6 7 8
3 4 5
0 1 2
And I was trying to several "local" communicator (MPI_Comm) that include:
- the rank of current node and
- those of the adjacent nodes.
I tried to split nodes from MPI_Comm_World and create new communicator for each node but failed to use the new communicator since it seems to include ranks not for the current node.
So here is my question, is it possible to use only one variable for all nodes, say, local_comm that contains different ranks for each node. Or I have to use different member variables like below
MPI_Comm local_comm_0 = {0, 1, 3};
MPI_Comm local_comm_4 = {1, 3, 4, 5, 7};
MPI_Comm local_comm_7 = {4, 6, 7, 8};
etc...
Thanks in advance.
MPI_CART_CREATE
isn't what you want, explain further. – High Performance Mark