On Wed, Jan 14, 2009 at 1:54 PM, Nguyen, Hung V ERDC-ITL-MS <span dir="ltr">&lt;<a href="mailto:Hung.V.Nguyen@usace.army.mil">Hung.V.Nguyen@usace.army.mil</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello All,<br>
<br>
I tried to solve an ill-conditioned system using cg with Jacobi<br>
preconditioned. The KSP solver was stopping due to diverged reason within a<br>
few iterations. Is there a way to keep KSP solver running until max_it?</blockquote><div><br>There is no way to continue CG here because it gets a zero divisor, and interprets<br>this as an indefinite matrix. You can try GMRES, however I would first check your<br>
matrix using -pc_type lu -ksp_type preonly to make sure its not singular.<br><br>&nbsp; Matt<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thanks,<br>
<br>
-hung<br>
<br>
hvnguyen:jade23% aprun -n 16 ./test_matrix_read -ksp_type cg -pc_type jacobi<br>
-ksp_rtol 1.0e-15 -ksp_max_it 50000 -ksp_monitor -ksp_converged_reason<br>
 &nbsp;0 KSP Residual norm 1.379074550666e+04<br>
 &nbsp;1 KSP Residual norm 7.252034661743e+03<br>
 &nbsp;2 KSP Residual norm 7.302184771313e+03<br>
 &nbsp;3 KSP Residual norm 1.162244351275e+04<br>
 &nbsp;4 KSP Residual norm 7.912531765659e+03<br>
 &nbsp;5 KSP Residual norm 4.094706251487e+03<br>
 &nbsp;6 KSP Residual norm 5.486131070301e+03<br>
 &nbsp;7 KSP Residual norm 6.367904529202e+03<br>
 &nbsp;8 KSP Residual norm 6.312767173219e+03<br>
Linear solve did not converge due to DIVERGED_INDEFINITE_MAT iterations 9<br>
Time in PETSc solver: 0.452695 seconds<br>
The number of iteration &nbsp; &nbsp; &nbsp; = 9<br>
The solution residual error = 6.312767e+03<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>