Dear MPI users,
I have a question about MPI_CART_SHIFT. How can I now all the processor neighbours.
I have understood how to know the left,right, above and bellow processor:
! Find neighbors CALL MPI_CART_SHIFT(COMM_CART,0,1,source,RCPU,MPI%iErr) ! x-dir, right CALL MPI_CART_SHIFT(COMM_CART,0,-1,source,LCPU,MPI%iErr) ! x-dir, left CALL MPI_CART_SHIFT(COMM_CART,1,1,source,TCPU,MPI%iErr) ! y-dir, top CALL MPI_CART_SHIFT(COMM_CART,1,-1,source,BCPU,MPI%iErr) ! y-dir, bottom
How can I now the processor the right and at the same time above processor? To make me clear, the processor that share not the edge but the corner.
Thanks a lot