allreduce_i32 Subroutine

private subroutine allreduce_i32(comm, buffer, op)

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer(kind=int32), intent(inout) :: buffer
integer, intent(in), optional :: op

Calls

proc~~allreduce_i32~2~~CallsGraph proc~allreduce_i32~2 allreduce_i32 mpi_allreduce mpi_allreduce proc~allreduce_i32~2->mpi_allreduce proc~comm_get~2 comm_t%comm_get proc~allreduce_i32~2->proc~comm_get~2

Called by

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

Variables

Type Visibility Attributes Name Initial
integer, private :: ierr
integer, private :: mpi_op

Source Code

   subroutine allreduce_i32(comm, buffer, op)
      type(comm_t), intent(in) :: comm
      integer(int32), intent(inout) :: buffer
      integer, intent(in), optional :: op
      integer :: mpi_op
      integer :: ierr

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

      call MPI_Allreduce(MPI_IN_PLACE, buffer, 1_int32, MPI_INTEGER, &
                         mpi_op, comm%get(), ierr)
   end subroutine allreduce_i32