mp_iscatter_cv2 Subroutine

private subroutine mp_iscatter_cv2(msg_scatter, msg, root, gid, request)

Scatters data from one processes to all others

MPI mapping mpi_scatter

Arguments

TypeIntentOptionalAttributesName
complex(kind=real_4), intent(in), CONTIGUOUS:: msg_scatter(:,:)

Data to scatter (for root process)

complex(kind=real_4), intent(inout), CONTIGUOUS:: msg(:)
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_iscatter_cv2(msg_scatter, msg, root, gid, request)
      !! Scatters data from one processes to all others
      !!
      !! MPI mapping
      !! mpi_scatter

         COMPLEX(kind=real_4), CONTIGUOUS, INTENT(IN)        :: msg_scatter(:, :)
         !! Data to scatter (for root process)
         COMPLEX(kind=real_4), CONTIGUOUS, INTENT(INOUT)     :: msg(:)
         INTEGER, INTENT(IN)                      :: root, gid
         !! Process which scatters data
         !! Message passing environment identifier
         INTEGER, INTENT(INOUT)                   :: request

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

         INTEGER                                  :: handle, ierr, msglen

         ierr = 0
         CALL timeset(routineN, handle)

         msglen = SIZE(msg)
#if defined(__parallel)
#if __MPI_VERSION > 2
         CALL mpi_iscatter(msg_scatter, msglen, MPI_COMPLEX, msg, &
                           msglen, MPI_COMPLEX, root, gid, request, ierr)
         IF (ierr /= 0) CALL mp_stop(ierr, "mpi_iscatter @ "//routineN)
         CALL add_perf(perf_id=24, msg_size=1*(2*real_4_size))
#else
         MARK_USED(msg_scatter)
         MARK_USED(msg)
         MARK_USED(root)
         MARK_USED(gid)
         request = mp_request_null
         DBCSR_ABORT("mp_iscatter requires MPI-3 standard")
#endif
#else
         MARK_USED(root)
         MARK_USED(gid)
         msg(:) = msg_scatter(:, 1)
         request = mp_request_null
#endif
         CALL timestop(handle)
      END SUBROUTINE mp_iscatter_cv2