psblas2-dev:

base/psblas/psb_damax.f90
 base/psblas/psb_zamax.f90

Merged fix for uninitialized values.
psblas3-type-indexed
Salvatore Filippone 17 years ago
parent 4e0c233a48
commit 75ab90328d

@ -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 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) imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix,jjx),1)
amax=abs(x(iix+imax-1,jjx)) amax=abs(x(iix+imax-1,jjx))
else
amax = dzero
end if end if
! compute global max ! 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 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) imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1)
amax=abs(x(iix+imax-1)) amax=abs(x(iix+imax-1))
else
amax = dzero
end if end if
! compute global max ! 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 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) imax=idamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1)
amax=abs(x(iix+imax-1)) amax=abs(x(iix+imax-1))
else
amax = dzero
end if end if
! compute global max ! 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) 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)) res(i)=abs(x(iix+imax-1,jjx+i-1))
end do end do
else
amax = dzero
end if end if
! compute global max ! compute global max

@ -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 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) imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix,jjx),1)
amax=cabs1(x(iix+imax-1,jjx)) amax=cabs1(x(iix+imax-1,jjx))
else
amax = dzero
end if end if
! compute global max ! 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) imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1)
cmax=(x(iix+imax-1)) cmax=(x(iix+imax-1))
amax=cabs1(cmax) amax=cabs1(cmax)
else
amax = dzero
end if end if
! compute global max ! 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) imax=izamax(psb_cd_get_local_rows(desc_a)-iix+1,x(iix),1)
cmax=(x(iix+imax-1)) cmax=(x(iix+imax-1))
amax=cabs1(cmax) amax=cabs1(cmax)
else
amax = dzero
end if end if
! compute global max ! compute global max
@ -501,6 +507,8 @@ subroutine psb_zmamaxs(res,x,desc_a, info,jx)
cmax=(x(iix+imax-1,jjx+i-1)) cmax=(x(iix+imax-1,jjx+i-1))
res(i)=cabs1(cmax) res(i)=cabs1(cmax)
end do end do
else
amax = dzero
end if end if
! compute global max ! compute global max

Loading…
Cancel
Save