wait_stat Subroutine

private subroutine wait_stat(request, status)

This routine waits for the communication, given by the message request, to complete. We return the status information

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: request
integer, intent(out), dimension(mp_status_size) :: status

Contents

Source Code


Source Code

  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