A subroutine to do a allgatherv operation, sending recvcnts(iproc) data from the iproc'th processor to all others starting at arr(start).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | arr |
The data to gather |
|
integer, | intent(in) | :: | count |
How much data to gather, <=SIZE(arr) |
||
complex, | intent(out), | dimension(:) | :: | out |
The gathered data |
|
integer, | intent(in), | dimension(:) | :: | recvcnts |
Array detailing how much data to expect from each proc |
|
integer, | intent(in), | dimension(:) | :: | displs |
Array detailing offset in array where gathered data is to be stored |
|
integer, | intent(out) | :: | request |
subroutine nb_allgatherv_complex_array_1to1(arr,count,out,recvcnts,displs,request)
implicit none
complex, dimension(:), intent(in) :: arr !< The data to gather
integer, intent(in) :: count !< How much data to gather, <=SIZE(arr)
complex, dimension(:), intent(out) :: out !< The gathered data
integer, dimension(:), intent(in) :: recvcnts !< Array detailing how much data to expect from each proc
integer, dimension(:), intent(in) :: displs !< Array detailing offset in array where gathered data is to be stored
integer, intent(out) :: request
# ifdef MPI3
integer :: ierror
!$OMP MASTER
call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
!Do the gather
call mpi_iallgatherv(arr,count,mpicmplx,out,recvcnts,displs,&
mpicmplx,mp_comm,request,ierror)
!$OMP MASTER
call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
# else
call allgatherv_complex_array_1to1(arr,count,out,recvcnts,displs)
request = mp_request_null
#endif
end subroutine nb_allgatherv_complex_array_1to1