This routine waits for the communication, given by the message request, to complete. We return the status information
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | request | |||
integer, | intent(out), | dimension(mp_status_size) | :: | status |
subroutine wait_stat (request, status)
implicit none
integer, intent (inout) :: request
integer, dimension(mp_status_size), intent(out) :: status
# ifdef MPI
!Note mpi_wait will set the request handle to MPI_NULL (or similar)
!when message complete so have to set requests as inout
integer :: ierror
!$OMP MASTER
call time_message(.false., time_mp_sync, ' MPI Sync')
!$OMP END MASTER
call mpi_wait(request,status,ierror)
!$OMP MASTER
call time_message(.false., time_mp_sync, ' MPI Sync')
!$OMP END MASTER
#else
UNUSED_DUMMY(request)
status = 0
# endif
end subroutine wait_stat