FinishOldWindowExchange Subroutine

public 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.

Arguments

TypeIntentOptionalAttributesName
integer, intent(inout) :: requests(:)
integer, intent(in) :: msgCount

Calls

proc~~finisholdwindowexchange~~CallsGraph proc~finisholdwindowexchange FinishOldWindowExchange mpi_waitall mpi_waitall proc~finisholdwindowexchange->mpi_waitall

Called by

proc~~finisholdwindowexchange~~CalledByGraph proc~finisholdwindowexchange FinishOldWindowExchange proc~exchangeoldwindowflat ExchangeOldWindowFlat proc~exchangeoldwindowflat->proc~finisholdwindowexchange proc~migrateoldwindow_dgmodel3d MigrateOldWindow_DGModel3D proc~migrateoldwindow_dgmodel3d->proc~finisholdwindowexchange proc~migrateoldwindow_dgmodel2d MigrateOldWindow_DGModel2D proc~migrateoldwindow_dgmodel2d->proc~finisholdwindowexchange proc~migrateoldwindow_dgmodel2d_t MigrateOldWindow_DGModel2D_t proc~migrateoldwindow_dgmodel2d_t->proc~exchangeoldwindowflat proc~migrateoldwindow_dgmodel3d_t MigrateOldWindow_DGModel3D_t proc~migrateoldwindow_dgmodel3d_t->proc~exchangeoldwindowflat proc~exchangeoldwindow ExchangeOldWindow proc~exchangeoldwindow->proc~exchangeoldwindowflat proc~exchangeoldwindow~2 ExchangeOldWindow proc~exchangeoldwindow~2->proc~exchangeoldwindowflat proc~adapt_amrcontroller2d Adapt_AMRController2D proc~adapt_amrcontroller2d->proc~migrateoldwindow_dgmodel2d_t proc~adapt_amrcontroller3d Adapt_AMRController3D proc~adapt_amrcontroller3d->proc~migrateoldwindow_dgmodel3d_t

Contents


Source Code

  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