A subroutine to do a non-blocking 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(in) | :: | sub_comm |
Sub-communicator handle |
||
integer, | intent(out) | :: | request |
FIXME : Add documentation |
subroutine nb_allgatherv_complex_array_1to3_sub(arr,count,out,recvcnts,displs,sub_comm,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(in) :: sub_comm !< Sub-communicator handle
integer, intent(out) :: request !< FIXME : Add documentation
# 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,sub_comm,request,ierror)
!$OMP MASTER
call time_message(.false., time_mp_collectives, ' MPI Collectives')
!$OMP END MASTER
#else
call allgatherv_complex_array_1to3_sub(arr,count,out,recvcnts,displs,sub_comm)
request = mp_request_null
#endif
end subroutine nb_allgatherv_complex_array_1to3_sub