possible bug in BiCGSTAB

4 views
Skip to first unread message

Kamaraju Kusumanchi

unread,
Dec 26, 2005, 5:21:04 PM12/26/05
to mcs...@nist.gov, flu...@googlegroups.com
Hi
I was going through the code at
http://math.nist.gov/iml++/bicgstab.h.txt where it mentions that upon
successful return, the max_iter will contain the number of iterations
performed before the tolerance was reached. It also mentions that a
successful return is indicated by a return value of 0.

However, in the second occurence of

return 0;

statement, max_iter is not updated before the return statement is
executed. In other words, I think

if ((resid = norm(s)/normb) < tol) {
x += alpha(0) * phat;
tol = resid;
return 0;
}

should infact be

if ((resid = norm(s)/normb) < tol) {
x += alpha(0) * phat;
tol = resid;
max_iter = i;
return 0;
}

Please correct me if I am wrong. If this is infact a bug, I would
appreciate if you can update the code regarding this.

thanks
raju


--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/

Reply all
Reply to author
Forward
0 new messages