mp_iscatter_c Subroutine

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

Scatters data from one processes to all others

MPI mapping mpi_scatter

Arguments

Type IntentOptional Attributes Name
complex(kind=real_4), intent(in), CONTIGUOUS :: msg_scatter(:)

Data to scatter (for root process)

complex(kind=real_4), intent(inout) :: msg
integer, intent(in) :: root

Process which scatters data

type(mp_comm_type), intent(in) :: gid

Message passing environment identifier

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

Source Code

      SUBROUTINE mp_iscatter_c (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), INTENT(INOUT)                 :: msg
         INTEGER, INTENT(IN)                      :: root
         !! Process which scatters data
         TYPE(mp_comm_type), INTENT(IN)           :: gid
         !! Message passing environment identifier
         TYPE(mp_request_type), INTENT(INOUT)     :: request

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

         INTEGER                                  :: handle, ierr, msglen

         ierr = 0
         CALL timeset(routineN, handle)

         msglen = 1
#if defined(__parallel)
         CALL mpi_iscatter(msg_scatter, msglen, MPI_COMPLEX, msg, &
                           msglen, MPI_COMPLEX, root, gid%handle, request%handle, 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(root)
         MARK_USED(gid)
         msg = msg_scatter(1)
         request = mp_request_null
#endif
         CALL timestop(handle)
      END SUBROUTINE mp_iscatter_c