<div dir="ltr">On Wed, Jun 5, 2013 at 12:33 PM, Gaurish Telang <span dir="ltr"><<a href="mailto:gaurish108@gmail.com" target="_blank">gaurish108@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I am trying to solve a non-linear system with PETSs's SNES solvers. <div>
<br></div><div>To run my code, I am using the following options for snes set through the command-line, </div><div>seen below.</div>
<div><br></div><div><div>mpirun -np 1 ./Testvector \</div><div>-fBus $1/Bus.mat \</div><div>-fYm $1/Ym.mat \</div><div> -ft $1/t.mat \</div><div>-flinedata $1/linedata.mat \</div><div>-nox \</div>
<div>-snes_atol 1.e-5\</div><div>-snes_stol 1.e-6 \</div><div>-snes_rtol 1.e-12 \</div><div>-snes_max_it 100 \</div><div>-snes_max_linear_solve_fail 100 \</div><div>-snes_converged_reason \</div><div>-ksp_type preonly \</div>
<div>-pc_type lu \</div><div>-pc_factor_mat_solver_package superlu_dist \</div><div>-snes_monitor \</div><div>> result_superLU_dist.tmp 2>&1;</div><div><br></div><div><br></div><div>After feeding my data, I get the following output</div>
<div><div> 0 SNES Function norm 2.438306296478e+02 </div><div> 1 SNES Function norm 1.679437793666e+02 </div><div> 2 SNES Function norm 1.493618467597e+02 </div><div> 3 SNES Function norm 4.622194635741e+01 </div>
<div> 4 SNES Function norm 4.195017632984e+01 </div><div>Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 4</div><div><br></div><div>As you can see the the SNES function norm is *decreasing*, which indicates it is probably converging slowly to the actual solution. However after just 4 iterations, it stops and indicates non-convergence, even though my -snes_max_it = 100 as shown above. </div>
<div><br></div><div>Is there a way to tell PETSc to continue its SNES iterations? Maybe some there are some </div><div>default parameters which have to be changed? </div></div></div></div></blockquote><div><br></div><div style>
You can try -snes_max_fail <num> or maybe -snes_linesearch_type basic.</div><div style><br></div><div style> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div><div>Thank you</div><span class=""><font color="#888888">
<div><br></div><div>Gaurish</div></font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <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
</div></div>