mp_cart_coords Subroutine

public subroutine mp_cart_coords(comm, rank, coords)

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: comm
integer, intent(in) :: rank
integer, intent(out), DIMENSION(:), CONTIGUOUS:: coords

Contents

Source Code


Source Code

   SUBROUTINE mp_cart_coords(comm, rank, coords)

      INTEGER, INTENT(IN)                                :: comm, rank
      INTEGER, DIMENSION(:), CONTIGUOUS, INTENT(OUT)     :: coords

      INTEGER                                            :: ierr, m

      ierr = 0

      m = SIZE(coords)
#if defined(__parallel)
      CALL mpi_cart_coords(comm, rank, m, coords, ierr)
      IF (ierr /= 0) CALL mp_stop(ierr, "mpi_cart_coords @ mp_cart_coords")
#else
      coords = 0
      MARK_USED(rank)
      MARK_USED(comm)
#endif

   END SUBROUTINE mp_cart_coords