trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.21k stars 566 forks source link

Strange behavior in LSQR condition number estimate #478

Closed michael-a-hansen closed 3 years ago

michael-a-hansen commented 8 years ago

I am attempting to use LSQR to estimate the condition number of some matrices. I began testing my code on simple matrices for which I know the exact condition numbers. While I can successfully get K=1 for a scaled identity matrix, I get inaccurate condition numbers that depend heavily on the linear solve tolerance for matrices of any additional complexity. For instance, on a diagonal matrix with A_{i,i} = -i, I observe that the condition number estimate increases as I tighten solver tolerance, up to 33x the exact answer at machine precision tolerance. Is this behavior strange or am I wrong in my understanding that a converged linear solve with LSQR will correspond to a good estimate of the condition number?

mhoemmen commented 8 years ago

Is this the LSQR solver in Belos?

michael-a-hansen commented 8 years ago

Yes

mhoemmen commented 8 years ago

I'll poke the person who wrote it and see if they can help out. Is this an urgent request?

michael-a-hansen commented 8 years ago

Thank you. It may be an important piece of a summer project, so I'd appreciate feedback within the next few weeks if possible.

michael-a-hansen commented 8 years ago

Hi again - while we wait and/or sort out potential Belos::LSQR issues, are there are any other options in Trilinos for estimating the condition number of a nonhermitian matrix?

mhoemmen commented 8 years ago

btw I didn't realize you were one of our summer interns. Could you please send me an e-mail? I'll put you in touch with the author of LSQR. You could probably just walk over and bug them ;-)

We have sparse LU factorizations. You could roll your own L1 condition number estimator using textbook algorithms. Alternately, you could run Belos GMRES and get the upper Hessenberg matrix out.

michael-a-hansen commented 8 years ago

Email sent. My linear algebra is rusty but I'll check out these other options. Thanks!

github-actions[bot] commented 3 years ago

This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. If you would like to keep this issue open please add a comment and remove the MARKED_FOR_CLOSURE label. If this issue should be kept open even with no activity beyond the time limits you can add the label DO_NOT_AUTOCLOSE.

github-actions[bot] commented 3 years ago

This issue was closed due to inactivity for 395 days.