v_to_p_i_dist Subroutine

private pure subroutine v_to_p_i_dist(nel, vdist, nim, pdist, idist)

Converts virtual 1-D distribution to process and image

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nel
integer, intent(in), DIMENSION(1:nel) :: vdist
integer, intent(in) :: nim
integer, intent(out), DIMENSION(1:nel) :: pdist
integer, intent(out), DIMENSION(1:nel) :: idist

Source Code

   pure SUBROUTINE v_to_p_i_dist(nel, vdist, nim, pdist, idist)
      !! Converts virtual 1-D distribution to process and image
      INTEGER, INTENT(in)                                :: nel
      INTEGER, DIMENSION(1:nel), INTENT(in)              :: vdist
      INTEGER, INTENT(in)                                :: nim
      INTEGER, DIMENSION(1:nel), INTENT(out)             :: pdist, idist

      INTEGER                                            :: i

      DO i = 1, nel
         pdist(i) = vdist(i)/nim
         idist(i) = MOD(vdist(i), nim) + 1
      END DO
   END SUBROUTINE v_to_p_i_dist