Gather real data to root node
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(inout) | :: | array |
local array for sending data |
||
| integer, | intent(in) | :: | localcount |
localcount elements will be sent to the root node |
||
| logical, | intent(inout) | :: | rootglobalarray |
array on the root node to 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 |
subroutine comms_no_sync_gatherv_logical(array, localcount, rootglobalarray, counts, displs, error, comm) !! Gather real data to root node implicit none logical, intent(inout) :: array !! local array for sending data integer, intent(in) :: localcount !! localcount elements will be sent to the root node logical, intent(inout) :: rootglobalarray !! array on the root node to 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_gatherv(array, localcount, MPI_LOGICAL, rootglobalarray, counts, displs, & MPI_LOGICAL, root_id, comm%comm, ierr) if (ierr .ne. MPI_SUCCESS) then call set_base_error(error, 'Error in comms_gatherv_logical', code_mpi) return end if #else ! rootglobalarray(1:localcount)=array(1:localcount) #endif end subroutine comms_no_sync_gatherv_logical