allreduce_sp_to Subroutine

private subroutine allreduce_sp_to(comm, sendbuf, recvbuf, op)

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
real(kind=sp), intent(in) :: sendbuf
real(kind=sp), intent(out) :: recvbuf
type(MPI_Op), intent(in), optional :: op

Calls

proc~~allreduce_sp_to~~CallsGraph proc~allreduce_sp_to allreduce_sp_to mpi_allreduce mpi_allreduce proc~allreduce_sp_to->mpi_allreduce proc~comm_get comm_t%comm_get proc~allreduce_sp_to->proc~comm_get

Called by

proc~~allreduce_sp_to~~CalledByGraph proc~allreduce_sp_to allreduce_sp_to interface~allreduce allreduce interface~allreduce->proc~allreduce_sp_to

Variables

Type Visibility Attributes Name Initial
integer, private :: ierr
type(MPI_Op), private :: op_used

Source Code

   subroutine allreduce_sp_to(comm, sendbuf, recvbuf, op)
      type(comm_t), intent(in) :: comm
      real(sp), intent(in) :: sendbuf
      real(sp), intent(out) :: recvbuf
      type(MPI_Op), intent(in), optional :: op
      type(MPI_Op) :: op_used
      integer :: ierr

      if (present(op)) then
         op_used = op
      else
         op_used = MPI_SUM
      end if

      call MPI_Allreduce(sendbuf, recvbuf, 1, MPI_REAL, &
                         op_used, comm%get(), ierr)
   end subroutine allreduce_sp_to