comms_scatterv_cmplx_4 Subroutine

private subroutine comms_scatterv_cmplx_4(array, localcount, rootglobalarray, counts, displs)

Scatter complex data from root node (array of rank 4)

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout), dimension(:, :, :, :):: array

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

complex(kind=dp), intent(inout), dimension(:, :, :, :):: rootglobalarray

array on the root node from which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs

Calls

proc~~comms_scatterv_cmplx_4~~CallsGraph proc~comms_scatterv_cmplx_4 comms_scatterv_cmplx_4 zcopy zcopy proc~comms_scatterv_cmplx_4->zcopy

Called by

proc~~comms_scatterv_cmplx_4~~CalledByGraph proc~comms_scatterv_cmplx_4 comms_scatterv_cmplx_4 interface~comms_scatterv comms_scatterv interface~comms_scatterv->proc~comms_scatterv_cmplx_4 proc~k_path k_path proc~k_path->interface~comms_scatterv

Contents


Source Code

  subroutine comms_scatterv_cmplx_4(array, localcount, rootglobalarray, counts, displs)
    !! Scatter complex data from root node (array of rank 4)
    implicit none

    complex(kind=dp), dimension(:, :, :, :), intent(inout) :: array
    !! local array for getting data
    integer, intent(in)                            :: localcount
    !! localcount elements will be fetched from the root node
    complex(kind=dp), dimension(:, :, :, :), intent(inout) :: rootglobalarray
    !! array on the root node from which data will be sent
    integer, dimension(num_nodes), intent(in)      :: counts
    !! how data should be partitioned, see MPI documentation or function comms_array_split
    integer, dimension(num_nodes), intent(in)      :: displs

#ifdef MPI
    integer :: error

    call MPI_scatterv(rootglobalarray, counts, displs, MPI_double_complex, &
                      array, localcount, MPI_double_complex, root_id, mpi_comm_world, error)

    if (error .ne. MPI_success) then
      call io_error('Error in comms_scatterv_cmplx_4')
    end if

#else
    call zcopy(localcount, rootglobalarray, 1, array, 1)
#endif

    return

  end subroutine comms_scatterv_cmplx_4