mp_waitall_2 Subroutine

private subroutine mp_waitall_2(requests)

waits for completion of the given requests

Arguments

Type IntentOptional Attributes Name
type(mp_request_type), intent(inout), DIMENSION(:, :) :: requests

Source Code

   SUBROUTINE mp_waitall_2(requests)
      !! waits for completion of the given requests
      TYPE(mp_request_type), DIMENSION(:, :), INTENT(inout)  :: requests

      CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_waitall_2'

      INTEGER                                  :: handle, ierr
#if defined(__parallel)
      INTEGER                                  :: count
      MPI_STATUS_TYPE_ARRAY(SIZE(requests))    :: status
#endif

      ierr = 0
      CALL timeset(routineN, handle)

#if defined(__parallel)
      count = SIZE(requests)

      CALL mpi_waitall_internal(count, requests, status, ierr) ! MPI_STATUSES_IGNORE openmpi workaround
      IF (ierr /= 0) CALL mp_stop(ierr, "mpi_waitall @ "//routineN)
#else
      MARK_USED(requests)
#endif
      CALL timestop(handle)
   END SUBROUTINE mp_waitall_2