base/serial/psb_spdot_srtd.f90

Fixed infinite loop bug in sparse AXPBY.
psblas3-final
Salvatore Filippone 12 years ago
parent 084f6d9f1a
commit 7ab5e1e8e0

@ -45,7 +45,6 @@ subroutine psb_s_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
if (ipy > ny) exit
if (ix(ipx) == iy(ipy)) then
acc = beta*y(ipy) + alpha*x(ipx)
if (acc /= szero) then
nz = nz + 1
if (nz > isz) then
info = -1
@ -55,7 +54,6 @@ subroutine psb_s_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
z(nz) = acc
ipx = ipx + 1
ipy = ipy + 1
end if
else
nz = nz + 1
if (nz > isz) then
@ -175,7 +173,6 @@ subroutine psb_d_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
if (ipy > ny) exit
if (ix(ipx) == iy(ipy)) then
acc = beta*y(ipy) + alpha*x(ipx)
if (acc /= dzero) then
nz = nz + 1
if (nz > isz) then
info = -1
@ -185,7 +182,6 @@ subroutine psb_d_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
z(nz) = acc
ipx = ipx + 1
ipy = ipy + 1
end if
else
nz = nz + 1
if (nz > isz) then
@ -321,7 +317,6 @@ subroutine psb_c_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
if (ipy > ny) exit
if (ix(ipx) == iy(ipy)) then
acc = beta*y(ipy) + alpha*x(ipx)
if (acc /= czero) then
nz = nz + 1
if (nz > isz) then
info = -1
@ -331,7 +326,6 @@ subroutine psb_c_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
z(nz) = acc
ipx = ipx + 1
ipy = ipy + 1
end if
else
nz = nz + 1
if (nz > isz) then
@ -451,7 +445,6 @@ subroutine psb_z_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
if (ipy > ny) exit
if (ix(ipx) == iy(ipy)) then
acc = beta*y(ipy) + alpha*x(ipx)
if (acc /= zzero) then
nz = nz + 1
if (nz > isz) then
info = -1
@ -461,7 +454,6 @@ subroutine psb_z_nspaxpby(nz,iz,z,alpha, nx, ix, x, beta, ny,iy,y,info)
z(nz) = acc
ipx = ipx + 1
ipy = ipy + 1
end if
else
nz = nz + 1
if (nz > isz) then

Loading…
Cancel
Save