comm_probe Subroutine

private subroutine comm_probe(comm, source, tag, status)

Blocking probe for incoming messages — caller reads status%MPI_SOURCE / status%MPI_TAG to dispatch the matching recv. Mirrors the f08 backend’s comm_probe.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer(kind=int32), intent(in) :: source
integer(kind=int32), intent(in) :: tag
type(MPI_Status), intent(out) :: status

Calls

proc~~comm_probe~2~~CallsGraph proc~comm_probe~2 comm_probe mpi_probe mpi_probe proc~comm_probe~2->mpi_probe proc~status_array_to_type status_array_to_type proc~comm_probe~2->proc~status_array_to_type

Called by

proc~~comm_probe~2~~CalledByGraph proc~comm_probe~2 comm_probe interface~probe~2 probe interface~probe~2->proc~comm_probe~2

Variables

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

Source Code

   subroutine comm_probe(comm, source, tag, status)
      !! Blocking probe for incoming messages — caller reads
      !! `status%MPI_SOURCE` / `status%MPI_TAG` to dispatch the matching
      !! `recv`.  Mirrors the f08 backend's `comm_probe`.
      type(comm_t), intent(in) :: comm
      integer(int32), intent(in) :: source
      integer(int32), intent(in) :: tag
      type(MPI_Status), intent(out) :: status
      integer(int32) :: ierr
      integer :: status_array(MPI_STATUS_SIZE)

      call MPI_Probe(source, tag, comm%m_comm, status_array, ierr)
      status = status_array_to_type(status_array)
   end subroutine comm_probe