mp_iallgatherv_lv2 Subroutine

private subroutine mp_iallgatherv_lv2(msgout, msgin, rcount, rdispl, gid, request)

Gathers vector data from all processes and all processes receive the same data

Data size Processes can send different-sized data

Ranks The last rank counts the processes

Offsets Offsets are from 0

MPI mapping mpi_allgather

Arguments

TypeIntentOptionalAttributesName
integer(kind=int_8), intent(in), CONTIGUOUS:: msgout(:)

Rank-1 data to send

integer(kind=int_8), intent(out), CONTIGUOUS:: msgin(:)

Received data

integer, intent(in), CONTIGUOUS:: rcount(:,:)
integer, intent(in), CONTIGUOUS:: rdispl(:,:)
integer, intent(in) :: gid

Size of sent data for every process Offset of sent data for every process Message passing environment identifier

integer, intent(inout) :: request

Contents

Source Code


Source Code

      SUBROUTINE mp_iallgatherv_lv2(msgout, msgin, rcount, rdispl, gid, request)
      !! Gathers vector data from all processes and all processes receive the
      !! same data
      !!
      !! Data size
      !! Processes can send different-sized data
      !!
      !! Ranks
      !! The last rank counts the processes
      !!
      !! Offsets
      !! Offsets are from 0
      !!
      !! MPI mapping
      !! mpi_allgather

         INTEGER(KIND=int_8), CONTIGUOUS, INTENT(IN)         :: msgout(:)
         !! Rank-1 data to send
         INTEGER(KIND=int_8), CONTIGUOUS, INTENT(OUT)       :: msgin(:)
         !! Received data
         INTEGER, CONTIGUOUS, INTENT(IN)          :: rcount(:, :), rdispl(:, :)
         INTEGER, INTENT(IN)                      :: gid
         !! Size of sent data for every process
         !! Offset of sent data for every process
         !! Message passing environment identifier
         INTEGER, INTENT(INOUT)                   :: request

         CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_iallgatherv_lv2'

         INTEGER                                  :: handle, ierr
#if defined(__parallel)
         INTEGER                                  :: scount, rsize
#endif

         ierr = 0
         CALL timeset(routineN, handle)

#if defined(__parallel)
         scount = SIZE(msgout)
         rsize = SIZE(rcount)
#if __MPI_VERSION > 2
         CALL mp_iallgatherv_lv_internal(msgout, scount, msgin, rsize, rcount, &
                                                     rdispl, gid, request, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_iallgatherv @ "//routineN)
#else
         MARK_USED(rcount)
         MARK_USED(rdispl)
         MARK_USED(gid)
         MARK_USED(msgin)
         request = mp_request_null
         DBCSR_ABORT("mp_iallgatherv requires MPI-3 standard")
#endif
#else
         MARK_USED(rcount)
         MARK_USED(rdispl)
         MARK_USED(gid)
         msgin = msgout
         request = mp_request_null
#endif
         CALL timestop(handle)
      END SUBROUTINE mp_iallgatherv_lv2