request_wait Subroutine

private subroutine request_wait(request, status)

Blocks until the operation associated with the request completes. The request is freed after completion.

Arguments

Type IntentOptional Attributes Name
type(request_t), intent(inout) :: request
type(MPI_Status), intent(out), optional :: status

Calls

proc~~request_wait~~CallsGraph proc~request_wait request_wait mpi_wait mpi_wait proc~request_wait->mpi_wait

Called by

proc~~request_wait~~CalledByGraph proc~request_wait request_wait interface~wait wait interface~wait->proc~request_wait

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: ierr

Source Code

   subroutine request_wait(request, status)
   !! Blocks until the operation associated with the request completes.
   !! The request is freed after completion.
      type(request_t), intent(inout) :: request
      type(MPI_Status), intent(out), optional :: status
      integer(int32) :: ierr

      if (.not. request%is_valid) then
         error stop "Cannot wait on null request"
      end if

      if (present(status)) then
         call MPI_Wait(request%m_request, status, ierr)
      else
         call MPI_Wait(request%m_request, MPI_STATUS_IGNORE, ierr)
      end if

      call request%free()
   end subroutine request_wait