From ee6992e938dad66f91b54f29f89dab864263d2db Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 30 May 2018 14:42:05 +0100 Subject: [PATCH] Avoid divide by zero for desc printout. --- base/tools/psb_cdprt.f90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/tools/psb_cdprt.f90 b/base/tools/psb_cdprt.f90 index 3a040ad1..8ada03cb 100644 --- a/base/tools/psb_cdprt.f90 +++ b/base/tools/psb_cdprt.f90 @@ -93,7 +93,11 @@ subroutine psb_cdprt(iout,desc_p,glob,short, verbosity) if (me == i) then write(iout,*) me,': Local descriptor data: points:',local_points,& & ' halo:',local_halo - write(iout,*) me,': Volume to surface ratio:',real(local_points,psb_dpk_)/real(local_halo,psb_dpk_) + if (local_halo>0) then + write(iout,*) me,': Volume to surface ratio:',real(local_points,psb_dpk_)/real(local_halo,psb_dpk_) + else + write(iout,*) me,': Volume to surface ratio:',0.0_psb_dpk_ + end if end if call psb_barrier(ictxt) end do