mp_cart_rank Subroutine

public subroutine mp_cart_rank(group, pos, rank)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: group
integer, intent(in), DIMENSION(:), CONTIGUOUS :: pos
integer, intent(out) :: rank

Contents

Source Code


Source Code

   SUBROUTINE mp_cart_rank(group, pos, rank)
      INTEGER, INTENT(IN)                                :: group
      INTEGER, DIMENSION(:), CONTIGUOUS, INTENT(IN)      :: pos
      INTEGER, INTENT(OUT)                               :: rank

      INTEGER                                            :: ierr

      ierr = 0

#if defined(__parallel)
      CALL mpi_cart_rank(group, pos, rank, ierr)
      IF (ierr /= 0) CALL mp_stop(ierr, "mpi_cart_rank @ mp_cart_rank")
#else
      rank = 0
      MARK_USED(group)
      MARK_USED(pos)
#endif

   END SUBROUTINE mp_cart_rank