MPI_Cart_coords finds the corresponding cartesian coordinates of a rank in a cartesian communicator.
Subroutine MPI_Cart_coords(comm, rank, maxdims, coords, ierr)
int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int *coords)
Example in Fortran
|
MPI_Cart_coords for all process
ranks (input) produce a correlation table of process ranks and
their corresponding cartesian coordinates (output).
| 0,0 (0) | 0,1 (1) |
| 1,0 (2) | 1,1 (3) |
| 2,0 (4) | 2,1 (5) |
Here is the fortran code used to generate the above table.
Note that: