mp_iallgatherv_zv2 Subroutine

private subroutine mp_iallgatherv_zv2(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

Type IntentOptional Attributes Name
complex(kind=real_8), intent(in), CONTIGUOUS :: msgout(:)

Rank-1 data to send

complex(kind=real_8), intent(out), CONTIGUOUS :: msgin(:)

Received data

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

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

type(mp_request_type), intent(inout) :: request

Source Code

      SUBROUTINE mp_iallgatherv_zv2(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

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

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

         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)
         CALL mp_iallgatherv_zv_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)
         msgin = msgout
         request = mp_request_null
#endif
         CALL timestop(handle)
      END SUBROUTINE mp_iallgatherv_zv2