Subroutine to broadcast the initial condition to all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(pf_pfasst_t), | intent(inout) | :: | pf | |||
real(kind=pfdp), | intent(in) | :: | y(nvar) | |||
integer, | intent(in) | :: | nvar | |||
integer, | intent(in) | :: | root |
subroutine pf_broadcast(pf, y, nvar, root)
type(pf_pfasst_t), intent(inout) :: pf
integer, intent(in) :: nvar, root
real(pfdp) , intent(in) :: y(nvar)
integer :: ierror
call start_timer(pf, TBROADCAST)
if(pf%debug) print *,'beginning broadcast'
call pf%comm%broadcast(pf, y, nvar, root, ierror)
if (ierror /= 0) then
print *, pf%rank, 'warning: error during broadcast', ierror
stop "pf_parallel:pf_broadcast"
endif
call end_timer(pf, TBROADCAST)
if(pf%debug)print *,'ending broadcast'
end subroutine pf_broadcast