Print_timers: check for allocated timers.

psblas-paraggr
Salvatore Filippone 6 years ago
parent fcc8a88112
commit 2bd9e4ffa6

@ -127,17 +127,19 @@ contains
end if end if
if (global_) then if (global_) then
allocate(ptimers(timer_entries_,size(timers,2)),stat=info) if (allocated(timers)) then
if (info /= 0) then allocate(ptimers(timer_entries_,size(timers,2)),stat=info)
write(0,*) 'Error while trying to allocate temporary ',info if (info /= 0) then
call psb_abort(ictxt) write(0,*) 'Error while trying to allocate temporary ',info
end if call psb_abort(ictxt)
ptimers = timers end if
call psb_max(ictxt,ptimers) ptimers = timers
if (me == psb_root_) then call psb_max(ictxt,ptimers)
do i=idxmin_, idxmax_ if (me == psb_root_) then
call print_timer(me, ptimers(:,i), timers_descr(i), iout) do i=idxmin_, idxmax_
end do call print_timer(me, ptimers(:,i), timers_descr(i), iout)
end do
end if
end if end if
else else
if ((proc_ == -1).or.(me==proc_)) then if ((proc_ == -1).or.(me==proc_)) then

Loading…
Cancel
Save