[petsc-users] lsqr usage

Ildar Rakhmanov ildar.kk at gmail.com
Wed May 23 16:15:06 CDT 2012


Hi,
I seems I am missing something. I want to use KSPLSQR.
I set up lsqr.c (see attachment)
it uses 3x2 matrix.

The results is

ildar at ildar:~/lsqr> ./lsqr
Matrix A after construction
row 0: (0, 1)  (1, 0)
row 1: (0, 0)  (1, 1)
row 2: (0, 1)  (1, 1)
u
1
1
b
0
0
0
b
1
1
2
[0]PETSC ERROR: --------------------- Error Message
------------------------------------
[0]PETSC ERROR: Invalid argument!
[0]PETSC ERROR: Must be square matrix, rows 3 columns 2!
[0]PETSC ERROR:
------------------------------------------------------------------------



Could any one point out how to correctly use LSQR solver?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120523/a8bd9a93/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsqr.c
Type: text/x-csrc
Size: 5622 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120523/a8bd9a93/attachment.c>


More information about the petsc-users mailing list