SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: c

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

Fortran Syntax
^^^^^^^^^^^^^^

.. code-block:: fortran

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

Fortran 2008 Syntax
^^^^^^^^^^^^^^^^^^^

.. code-block:: fortran

    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
