mp_iscatterv_lv Subroutine

private subroutine mp_iscatterv_lv(msg_scatter, sendcounts, displs, msg, recvcount, root, gid, request)

Scatters data from one processes to all others

MPI mapping mpi_scatter

Arguments

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

Data to scatter (for root process)

integer, intent(in), CONTIGUOUS:: sendcounts(:)
integer, intent(in), CONTIGUOUS:: displs(:)
integer(kind=int_8), intent(inout), CONTIGUOUS:: msg(:)
integer, intent(in) :: recvcount

Process which scatters data Message passing environment identifier

integer, intent(in) :: root

Process which scatters data Message passing environment identifier

integer, intent(in) :: gid

Process which scatters data Message passing environment identifier

integer, intent(inout) :: request

Contents

Source Code


Source Code

      SUBROUTINE mp_iscatterv_lv(msg_scatter, sendcounts, displs, msg, recvcount, root, gid, request)
      !! Scatters data from one processes to all others
      !!
      !! MPI mapping
      !! mpi_scatter

         INTEGER(KIND=int_8), CONTIGUOUS, INTENT(IN)        :: msg_scatter(:)
         !! Data to scatter (for root process)
         INTEGER, CONTIGUOUS, INTENT(IN)          :: sendcounts(:), displs(:)
         INTEGER(KIND=int_8), CONTIGUOUS, INTENT(INOUT)     :: msg(:)
         INTEGER, INTENT(IN)                      :: recvcount, root, gid
         !! Process which scatters data
         !! Message passing environment identifier
         INTEGER, INTENT(INOUT)                   :: request

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

         INTEGER                                  :: handle, ierr

         ierr = 0
         CALL timeset(routineN, handle)

#if defined(__parallel)
#if __MPI_VERSION > 2
         CALL mpi_iscatterv(msg_scatter, sendcounts, displs, MPI_INTEGER8, msg, &
                            recvcount, MPI_INTEGER8, root, gid, request, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_iscatterv @ "//routineN)
         CALL add_perf(perf_id=24, msg_size=1*int_8_size)
#else
         MARK_USED(msg_scatter)
         MARK_USED(sendcounts)
         MARK_USED(displs)
         MARK_USED(msg)
         MARK_USED(recvcount)
         MARK_USED(root)
         MARK_USED(gid)
         request = mp_request_null
         DBCSR_ABORT("mp_iscatterv requires MPI-3 standard")
#endif
#else
         MARK_USED(sendcounts)
         MARK_USED(displs)
         MARK_USED(recvcount)
         MARK_USED(root)
         MARK_USED(gid)
         msg(1:recvcount) = msg_scatter(1 + displs(1):1 + displs(1) + sendcounts(1))
         request = mp_request_null
#endif
         CALL timestop(handle)
      END SUBROUTINE mp_iscatterv_lv