Hi, <br>I seems I am missing something. I want to use KSPLSQR.<br>I set up lsqr.c (see attachment)<br>it uses 3x2 matrix.<br><br>The results is<br><br>ildar@ildar:~/lsqr> ./lsqr <br>Matrix A after construction<br>row 0: (0, 1) (1, 0) <br>
row 1: (0, 0) (1, 1) <br>row 2: (0, 1) (1, 1) <br>u <br>1<br>1<br>b <br>0<br>0<br>0<br>b <br>1<br>1<br>2<br>[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[0]PETSC ERROR: Invalid argument!<br>
[0]PETSC ERROR: Must be square matrix, rows 3 columns 2!<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br><br><br><br>Could any one point out how to correctly use LSQR solver?<br>
<br>