comms_gatherv_cmplx_3_4 Subroutine

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

Gather complex data to root node (for arrays of rank 3 and 4, respectively)

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout), dimension(:, :, :):: array
integer, intent(in) :: localcount
complex(kind=dp), intent(inout), dimension(:, :, :, :):: rootglobalarray
integer, intent(in), dimension(num_nodes):: counts
integer, intent(in), dimension(num_nodes):: displs

Calls

proc~~comms_gatherv_cmplx_3_4~~CallsGraph proc~comms_gatherv_cmplx_3_4 comms_gatherv_cmplx_3_4 zcopy zcopy proc~comms_gatherv_cmplx_3_4->zcopy

Called by

proc~~comms_gatherv_cmplx_3_4~~CalledByGraph proc~comms_gatherv_cmplx_3_4 comms_gatherv_cmplx_3_4 interface~comms_gatherv comms_gatherv interface~comms_gatherv->proc~comms_gatherv_cmplx_3_4 proc~k_path k_path proc~k_path->interface~comms_gatherv proc~k_slice k_slice proc~k_slice->interface~comms_gatherv

Contents


Source Code

  subroutine comms_gatherv_cmplx_3_4(array, localcount, rootglobalarray, counts, displs)
    !! Gather complex data to root node (for arrays of rank 3 and 4, respectively)
    implicit none

    complex(kind=dp), dimension(:, :, :), intent(inout)   :: array
    integer, intent(in)                                 :: localcount
    complex(kind=dp), dimension(:, :, :, :), intent(inout) :: rootglobalarray
    integer, dimension(num_nodes), intent(in)           :: counts
    integer, dimension(num_nodes), intent(in)           :: displs

#ifdef MPI
    integer :: error

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

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

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

    return

  end subroutine comms_gatherv_cmplx_3_4