allreduce_dp_array_to Subroutine

private subroutine allreduce_dp_array_to(comm, sendbuf, recvbuf, count, op)

Arguments

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

Called by

proc~~allreduce_dp_array_to~2~~CalledByGraph proc~allreduce_dp_array_to~2 allreduce_dp_array_to interface~allreduce~2 allreduce interface~allreduce~2->proc~allreduce_dp_array_to~2

Variables

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

Source Code

   subroutine allreduce_dp_array_to(comm, sendbuf, recvbuf, count, op)
      type(comm_t), intent(in) :: comm
      real(dp), intent(in) :: sendbuf(:)
      real(dp), intent(out) :: recvbuf(:)
      integer, intent(in), optional :: count
      type(MPI_Op), intent(in), optional :: op
      type(MPI_Op) :: op_used
      integer :: ierr, n

      ! One rank: the reduced result is this rank's own
      ! contribution.
      if (present(count)) then
         n = count
      else
         n = size(sendbuf)
      end if

      recvbuf(1:n) = sendbuf(1:n)
   end subroutine allreduce_dp_array_to