SYNTAX

C Syntax

int MPI_Cart_rank(MPI_Comm comm, const int coords[], int* rank)

Fortran Syntax

USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_CART_RANK(COMM, COORDS, RANK, IERROR)
    INTEGER COMM, COORDS(*), RANK, IERROR

Fortran 2008 Syntax

USE mpi_f08
MPI_Cart_rank(comm, coords, rank, ierror)
    TYPE(MPI_Comm), INTENT(IN) :: comm
    INTEGER, INTENT(IN) :: coords(*)
    INTEGER, INTENT(OUT) :: rank
    INTEGER, OPTIONAL, INTENT(OUT) :: ierror