waits for completion of the given requests
see isendrecv
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout), | DIMENSION(:), CONTIGUOUS | :: | requests |
SUBROUTINE mp_waitall_1(requests)
!! waits for completion of the given requests
!! @note
!! see isendrecv
INTEGER, DIMENSION(:), CONTIGUOUS, INTENT(inout) :: requests
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_waitall_1'
INTEGER :: handle, ierr
#if defined(__parallel)
INTEGER :: count
INTEGER, ALLOCATABLE, DIMENSION(:, :) :: status
#endif
ierr = 0
CALL timeset(routineN, handle)
#if defined(__parallel)
count = SIZE(requests)
ALLOCATE (status(MPI_STATUS_SIZE, count))
CALL mpi_waitall_internal(count, requests, status, ierr) ! MPI_STATUSES_IGNORE openmpi workaround
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_waitall @ "//routineN)
DEALLOCATE (status)
#else
MARK_USED(requests)
#endif
CALL timestop(handle)
END SUBROUTINE mp_waitall_1