Gather complex data to root node (for arrays of rank 2)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(inout) | :: | array(:,:) | |||
| integer, | intent(in) | :: | localcount | |||
| complex(kind=dp), | intent(inout) | :: | rootglobalarray(:,:) | |||
| integer, | intent(in) | :: | counts(0:) | |||
| integer, | intent(in) | :: | displs(0:) | |||
| type(w90_error_type), | intent(out), | allocatable | :: | error | ||
| type(w90_comm_type), | intent(in) | :: | comm |
subroutine comms_no_sync_gatherv_cmplx_2(array, localcount, rootglobalarray, counts, displs, error, comm) !! Gather complex data to root node (for arrays of rank 2) implicit none complex(kind=dp), intent(inout) :: array(:, :) integer, intent(in) :: localcount complex(kind=dp), intent(inout) :: rootglobalarray(:, :) integer, intent(in) :: counts(0:) 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_gatherv(array, localcount, MPI_DOUBLE_COMPLEX, rootglobalarray, counts, displs, & MPI_DOUBLE_COMPLEX, root_id, comm%comm, ierr) if (ierr .ne. MPI_SUCCESS) then call set_base_error(error, 'Error in comms_gatherv_cmplx_2', code_mpi) return end if #else call zcopy(localcount, array, 1, rootglobalarray, 1) rootglobalarray = array #endif end subroutine comms_no_sync_gatherv_cmplx_2