diff --git a/base/psblas/psb_damax.f90 b/base/psblas/psb_damax.f90 index d6b488b2..4c2e0332 100644 --- a/base/psblas/psb_damax.f90 +++ b/base/psblas/psb_damax.f90 @@ -107,6 +107,8 @@ function psb_damax (x,desc_a, info, jx) if ((psb_cd_get_local_rows(desc_a) > 0).and.(m /= 0)) then imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix,jjx),1) amax=abs(x(iix+imax-1,jjx)) + else + amax = dzero end if ! compute global max @@ -230,6 +232,8 @@ function psb_damaxv (x,desc_a, info) if ((psb_cd_get_local_rows(desc_a) > 0).and.(m /= 0)) then imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1) amax=abs(x(iix+imax-1)) + else + amax = dzero end if ! compute global max @@ -354,6 +358,8 @@ subroutine psb_damaxvs (res,x,desc_a, info) if ((psb_cd_get_local_rows(desc_a) > 0).and.(m /= 0)) then imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1) amax=abs(x(iix+imax-1)) + else + amax = dzero end if ! compute global max @@ -484,6 +490,8 @@ subroutine psb_dmamaxs (res,x,desc_a, info,jx) imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix,jjx+i-1),1) res(i)=abs(x(iix+imax-1,jjx+i-1)) end do + else + amax = dzero end if ! compute global max diff --git a/base/psblas/psb_zamax.f90 b/base/psblas/psb_zamax.f90 index 9e0a439c..2ff2f54f 100644 --- a/base/psblas/psb_zamax.f90 +++ b/base/psblas/psb_zamax.f90 @@ -110,6 +110,8 @@ function psb_zamax (x,desc_a, info, jx) if ((psb_cd_get_local_rows(desc_a) > 0).and.(m /= 0)) then imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix,jjx),1) amax=cabs1(x(iix+imax-1,jjx)) + else + amax = dzero end if ! compute global max @@ -238,6 +240,8 @@ function psb_zamaxv (x,desc_a, info) imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1) cmax=(x(iix+imax-1)) amax=cabs1(cmax) + else + amax = dzero end if ! compute global max @@ -366,6 +370,8 @@ subroutine psb_zamaxvs(res,x,desc_a, info) imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1) cmax=(x(iix+imax-1)) amax=cabs1(cmax) + else + amax = dzero end if ! compute global max @@ -501,6 +507,8 @@ subroutine psb_zmamaxs(res,x,desc_a, info,jx) cmax=(x(iix+imax-1,jjx+i-1)) res(i)=cabs1(cmax) end do + else + amax = dzero end if ! compute global max