GetMPIsum Subroutine

public subroutine GetMPIsum(n, bufl, bufg)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=8), intent(in) :: bufl(n)
real(kind=8), intent(out) :: bufg(n)

Calls

proc~~getmpisum~~CallsGraph proc~getmpisum GetMPIsum mpi_allreduce mpi_allreduce proc~getmpisum->mpi_allreduce

Called by

proc~~getmpisum~~CalledByGraph proc~getmpisum GetMPIsum proc~realtimeanalysis RealTimeAnalysis proc~realtimeanalysis->proc~getmpisum

Source Code

subroutine GetMPIsum(n,bufl,bufg)
  implicit none
  integer,intent(in) :: n
  real(8),intent(in) :: bufl(n)
  real(8),intent(out):: bufg(n)
  if(ntiles(1)*ntiles(2)*ntiles(3) /= 1)then 
!$acc host_data use_device(bufl,bufg)
       call MPI_ALLREDUCE( bufl, bufg, n &
     &                   , MPI_DOUBLE_PRECISION   &
     &                   , MPI_SUM, comm3d, ierr)
!$acc end host_data
    else
!$acc serial
       bufg(:) = bufl(:)
!$acc end serial
    endif
    
end subroutine GetMPIsum