Wait on the messages PostOldWindowExchange posted. A no-op when nothing was posted, which is the common case for a symmetric refinement: under a contiguous space-filling-curve repartition each rank's new range is sourced from its own old range, so the window is entirely local and not a single byte moves.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | requests(:) | |||
| integer, | intent(in) | :: | msgCount |
subroutine FinishOldWindowExchange(requests,msgCount)
!! Wait on the messages PostOldWindowExchange posted. A no-op when nothing was posted, which
!! is the common case for a symmetric refinement: under a contiguous space-filling-curve
!! repartition each rank's new range is sourced from its own old range, so the window is
!! entirely local and not a single byte moves.
implicit none
integer,intent(inout) :: requests(:)
integer,intent(in) :: msgCount
! Local
integer :: ierror
integer,allocatable :: stats(:,:)
if(msgCount > 0) then
allocate(stats(MPI_STATUS_SIZE,1:msgCount))
call MPI_WAITALL(msgCount,requests(1:msgCount), &
stats(1:MPI_STATUS_SIZE,1:msgCount),ierror)
deallocate(stats)
endif
endsubroutine FinishOldWindowExchange