comms_no_sync_scatterv_real_3 Subroutine

private subroutine comms_no_sync_scatterv_real_3(array, localcount, rootglobalarray, counts, displs, error, comm)

Scatter real data from root node (array of rank 3)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(inout) :: array(:,:,:)

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

real(kind=dp), intent(inout) :: rootglobalarray(:,:,:)

array on the root node from which data will be sent

integer, intent(in) :: counts(0:)

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

integer, intent(in) :: displs(0:)
type(w90_error_type), intent(out), allocatable :: error
type(w90_comm_type), intent(in) :: comm

Called by

proc~~comms_no_sync_scatterv_real_3~~CalledByGraph proc~comms_no_sync_scatterv_real_3 comms_no_sync_scatterv_real_3 interface~comms_no_sync_scatterv comms_no_sync_scatterv interface~comms_no_sync_scatterv->proc~comms_no_sync_scatterv_real_3 proc~comms_scatterv_real_3 comms_scatterv_real_3 proc~comms_scatterv_real_3->proc~comms_no_sync_scatterv_real_3 interface~comms_scatterv comms_scatterv interface~comms_scatterv->proc~comms_scatterv_real_3 proc~geninterp_main geninterp_main proc~geninterp_main->interface~comms_scatterv proc~get_aa_r get_AA_R proc~get_aa_r->interface~comms_scatterv proc~get_bb_r get_BB_R proc~get_bb_r->interface~comms_scatterv proc~get_cc_r get_CC_R proc~get_cc_r->interface~comms_scatterv proc~get_saa_r get_SAA_R proc~get_saa_r->interface~comms_scatterv proc~get_sbb_r get_SBB_R proc~get_sbb_r->interface~comms_scatterv proc~k_path k_path proc~k_path->interface~comms_scatterv proc~k_path->proc~get_aa_r proc~k_path->proc~get_bb_r proc~k_path->proc~get_cc_r proc~berry_main berry_main proc~berry_main->proc~get_aa_r proc~berry_main->proc~get_bb_r proc~berry_main->proc~get_cc_r proc~berry_main->proc~get_saa_r proc~berry_main->proc~get_sbb_r proc~berry_get_sc_klist berry_get_sc_klist proc~berry_main->proc~berry_get_sc_klist proc~gyrotropic_main gyrotropic_main proc~gyrotropic_main->proc~get_aa_r proc~gyrotropic_main->proc~get_bb_r proc~gyrotropic_main->proc~get_cc_r proc~k_slice k_slice proc~k_slice->proc~get_aa_r proc~k_slice->proc~get_bb_r proc~k_slice->proc~get_cc_r proc~wham_get_eig_uu_hh_aa_sc_tb_conv wham_get_eig_UU_HH_AA_sc_TB_conv proc~wham_get_eig_uu_hh_aa_sc_tb_conv->proc~get_aa_r program~postw90 postw90 program~postw90->proc~geninterp_main program~postw90->proc~k_path program~postw90->proc~berry_main program~postw90->proc~gyrotropic_main program~postw90->proc~k_slice proc~berry_get_sc_klist->proc~wham_get_eig_uu_hh_aa_sc_tb_conv

Source Code

  subroutine comms_no_sync_scatterv_real_3(array, localcount, rootglobalarray, counts, displs, error, comm)
    !! Scatter real data from root node (array of rank 3)
    implicit none

    real(kind=dp), intent(inout) :: array(:, :, :) !! local array for getting data
    integer, intent(in) :: localcount !! localcount elements will be fetched from the root node
    real(kind=dp), intent(inout) :: rootglobalarray(:, :, :) !! array on the root node from which data will be sent
    integer, intent(in) :: counts(0:) !! how data should be partitioned, see MPI documentation or function comms_array_split
    integer, intent(in) :: displs(0:)
    type(w90_comm_type), intent(in) :: comm
    type(w90_error_type), allocatable, intent(out) :: error

#ifdef W90_MPI
    integer :: ierr

    call mpi_scatterv(rootglobalarray, counts, displs, MPI_DOUBLE_PRECISION, array, localcount, &
                      MPI_DOUBLE_PRECISION, root_id, comm%comm, ierr)

    if (ierr .ne. MPI_SUCCESS) then
      call set_base_error(error, 'Error in comms_scatterv_real_3', code_mpi)
      return
    end if

#else
    !call dcopy(localcount, rootglobalarray, 1, array, 1)
    array = rootglobalarray
#endif

  end subroutine comms_no_sync_scatterv_real_3