tests for completion of the given requests
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(mp_request_type), | intent(inout), | DIMENSION(:, :) | :: | requests | ||
integer, | intent(out), | optional | :: | completed | ||
logical, | intent(out), | optional | :: | flag |
SUBROUTINE mp_testany_2(requests, completed, flag) !! tests for completion of the given requests TYPE(mp_request_type), DIMENSION(:, :), INTENT(inout) :: requests INTEGER, INTENT(out), OPTIONAL :: completed LOGICAL, INTENT(out), OPTIONAL :: flag INTEGER :: ierr #if defined(__parallel) INTEGER :: completed_l, count LOGICAL :: flag_l #endif ierr = 0 #if defined(__parallel) count = SIZE(requests) CALL mpi_testany_internal(count, requests, completed_l, flag_l, MPI_STATUS_IGNORE, ierr) IF (ierr /= 0) CALL mp_stop(ierr, "mpi_testany_2 @ mp_testany") IF (PRESENT(completed)) completed = completed_l IF (PRESENT(flag)) flag = flag_l #else MARK_USED(requests) IF (PRESENT(completed)) completed = 1 IF (PRESENT(flag)) flag = .TRUE. #endif END SUBROUTINE mp_testany_2