## [Vxl-users] I don't believe it

 [Vxl-users] I don't believe it From: dominique - 2002-09-23 16:13:08 ```Hi, As you may remember I was using vxl wrapper for LSQR to iterate a huge set of linear equations. Well, I knew it's an iterator, not a solver, so I was ready to sacrifice a bit of time. But I just took CERN's F112 (http://wwwinfo.cern.ch/asdoc/shortwrupsdir/f112/top.html) to do the same job, and here is the speed comparison: LSQR: sys_solve()::DIM=277 DIM1=276 sys_solve()::MAXITER=100000 sys_solve():: preparing...solving...done.calculating time = 311 seconds (5.18333 minutes) /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : The equations A*x = b are probably compatible. Norm(A*x - b) is as small as seems reasonable on this machine. /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : residual norm estimate = 2.33759e-08 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : result norm estimate = 1.91629 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : condition no. estimate = 1.68610e+09 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : iterations = 12370 F112: sys_solve2()::DIM=277 DIM1=276 sys_solve2():: packing...done. inverting...done.calculating time = 1 seconds (0.0166667 minutes) multiplying...done.calculating time = 0 seconds (0.00000 minutes) *which I just don't believe*. Both results are IDENTICAL (!!!) in Double precission (I tripple-checked the codes for stupid mistakes) and comparable in F112 float (well, LSQR is ONLY double). 1) What was I doing wrong with LSQR? Did I do something stupid just loosing time somewhere in the wrapper or it's just not the right method for linear systems? (I'm not a linalg guy) 2) You could consider implementing F112 in vxl. I can provide a contact person there. comments/condemns will be appreciated, Dominique ```

 [Vxl-users] I don't believe it From: dominique - 2002-09-23 16:13:08 ```Hi, As you may remember I was using vxl wrapper for LSQR to iterate a huge set of linear equations. Well, I knew it's an iterator, not a solver, so I was ready to sacrifice a bit of time. But I just took CERN's F112 (http://wwwinfo.cern.ch/asdoc/shortwrupsdir/f112/top.html) to do the same job, and here is the speed comparison: LSQR: sys_solve()::DIM=277 DIM1=276 sys_solve()::MAXITER=100000 sys_solve():: preparing...solving...done.calculating time = 311 seconds (5.18333 minutes) /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : The equations A*x = b are probably compatible. Norm(A*x - b) is as small as seems reasonable on this machine. /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : residual norm estimate = 2.33759e-08 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : result norm estimate = 1.91629 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : condition no. estimate = 1.68610e+09 /home/domi/pack/vxl_290502/src/vxl/vnl/algo/vnl_lsqr.cxx : iterations = 12370 F112: sys_solve2()::DIM=277 DIM1=276 sys_solve2():: packing...done. inverting...done.calculating time = 1 seconds (0.0166667 minutes) multiplying...done.calculating time = 0 seconds (0.00000 minutes) *which I just don't believe*. Both results are IDENTICAL (!!!) in Double precission (I tripple-checked the codes for stupid mistakes) and comparable in F112 float (well, LSQR is ONLY double). 1) What was I doing wrong with LSQR? Did I do something stupid just loosing time somewhere in the wrapper or it's just not the right method for linear systems? (I'm not a linalg guy) 2) You could consider implementing F112 in vxl. I can provide a contact person there. comments/condemns will be appreciated, Dominique ```
 Re: [Vxl-users] I don't believe it From: dominique - 2002-09-24 13:21:02 ``` hi, more conclusions: F112 seems more efficient for small and medium sized systems (in my case up to a few thousands). With bigger systems I have problems with memory (size and access speed) so I cannot conclude yet. LSQR seems to handle memory size better (dedicated sparse handling), but access to sparse matrix is much slower. And solving a 10,000x10,000 matrix with LSQR I had to wait more than 0.5h (unacceptable for what I need) and still didnt get a stable solution (good aproximation though). let me know if you wanted more on this later dominique wrote: ```