Hi again,

back to the original problem: The RHS is not passed correctly. Use the sample system attached, it is just 4x4 and should converge nicely. If I print the RHS vector passed to the iterative solver, it is all zero. Therefore, the solver doesn't even start to iterate, but instead returns the exact solution (vector with all zeros) directly.

I haven't searched for the exact spot where the error occurs, but I'm pretty sure you will find this quickly :-)

Best regards,
Karli


On 02/18/2014 01:03 PM, Toby St Clere Smithe wrote:
Hi,

so there's one last thing before I can get a release out that's been
bugging me for the last couple of days: I can't seem to get the
iterative solvers to work, for either dense or sparse matrices. I've
tried an implementation of the 'mat65k.mtx' example, I've tried using
the identity matrix, and for anything I try, I get 0 iterations and a
zero result vector. The direct solvers work fine. Any ideas?

Here's the example output from examples/iterative-solvers.py:

Solution of Ax = b for x:
[ 0.  0.  0. ...,  0.  0.  0.]
Num. iterations: 0
Estimated error: 6.94731371524e-310

If you want to test for yourself (please do!), just grab my pyviennacl
branch[1], build as usual, and then use a command like the following
(you don't need to `make install`):

PYTHONPATH=build/build/lib.linux-x86_64-2.7 python examples/iterative-solvers.py

Cheers,

Toby


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel


%%MatrixMarket matrix coordinate real general
4 4 10
1 1 2.0
1 2 -1.0
2 1 -1.0
2 2 2.0
2 3 -1.0
3 2 -1.0
3 3 2.0
3 4 -1.0
4 3 -1.0
4 4 2.0
4
1.0 1.0 1.0 1.0

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to