testall_stat Subroutine

private subroutine testall_stat(count, requests, status, flag)

A routine to test for all count communications, given by the message handles in requests, to complete. We return the message statuses and completion flag

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: count
integer, intent(inout), dimension(:) :: requests
integer, intent(out), dimension(mp_status_size, count) :: status
logical, intent(out) :: flag

Contents

Source Code


Source Code

  subroutine testall_stat (count, requests, status, flag)
    implicit none
    integer, intent(in) :: count
    integer, dimension(:), intent (inout) :: requests
    integer, dimension(mp_status_size, count), intent(out) :: status
    logical, intent(out) :: flag
# ifdef MPI
    !Note mpi_test 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_testall(count,requests,flag,status,ierror)
!$OMP MASTER
    call time_message(.false., time_mp_sync, ' MPI Sync')
!$OMP END MASTER
# else
    UNUSED_DUMMY(count); UNUSED_DUMMY(requests)
    status = 0
    flag = .false.
# endif
  end subroutine testall_stat