Complete the aggregated halo exchange started by SideExchangeStart: wait on the persistent requests and unpack the received traces into extBoundary, applying side flips. The host blocks in MPI_Waitall (which also drives MPI progress) while previously launched device kernels continue to execute. No-op if no exchange is in flight.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MappedScalar2D), | intent(inout) | :: | this | |||
| type(Mesh2D), | intent(inout) | :: | mesh |
subroutine SideExchangeFinish_MappedScalar2D(this,mesh)
!! Complete the aggregated halo exchange started by SideExchangeStart:
!! wait on the persistent requests and unpack the received traces into
!! extBoundary, applying side flips. The host blocks in MPI_Waitall (which
!! also drives MPI progress) while previously launched device kernels
!! continue to execute. No-op if no exchange is in flight.
implicit none
class(MappedScalar2D),intent(inout) :: this
type(Mesh2D),intent(inout) :: mesh
! Local
integer :: iError
if(this%halo_inflight > 0) then
call MPI_WAITALL(2*mesh%decomp%halo_nnbr,this%halo_reqs, &
MPI_STATUSES_IGNORE,iError)
! Unpack the received traces into extBoundary, applying side flips
call HaloUnpack_2D_gpu(this%halo_recvbuf_gpu,this%extboundary_gpu, &
mesh%decomp%halo_sides_gpu,this%interp%N, &
this%halo_inflight,this%nelem,mesh%decomp%halo_nsides)
if(this%halo_inflight == this%nvar) this%halo_static_done = .true.
this%halo_inflight = 0
endif
endsubroutine SideExchangeFinish_MappedScalar2D