<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 10, 2016 at 7:33 PM, Michele Rosso <span dir="ltr"><<a href="mailto:mrosso@uci.edu" target="_blank">mrosso@uci.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
Hi,<br>
<br>
I encountered the following error while solving a symmetric positive defined system:<br>
<br>
Linear solve did not converge due to DIVERGED_PCSETUP_FAILED iterations 0<br>
PCSETUP_FAILED due to SUBPC_ERROR <br>
<br>
This error appears only if I use the optimized version of both petsc and my code ( compiler: gfortran, flags: -O3 ).<br>
It is weird since I am solving a time-dependent problem and everything, i.e. results and convergence rate, are as expected until the above error shows up. If I run both petsc and my code in debug mode, everything goes smooth till the end of the simulation.<br>
However, if I reduce the ksp_rtol, even the debug run fails, after running as expected for a while, because of a KSP_DIVERGED_INDEFINITE_PC . <br>
The options I am using are:<br>
<br>
-ksp_type cg<br>
-ksp_norm_type unpreconditioned<br>
-ksp_rtol 1e-8<br>
-ksp_lag_norm<br>
-ksp_initial_guess_nonzero yes<br>
-pc_type mg<br>
-pc_mg_galerkin<br>
-pc_mg_levels 4<br>
-mg_levels_ksp_type richardson<br>
-mg_coarse_ksp_constant_null_space<br>
-mg_coarse_pc_type lu<br>
-mg_coarse_pc_factor_mat_solver_package superlu_dist<br>
-options_left<br>
<br>
I attached a copy of ksp_view. I am currently using petsc-master (last updated yesterday).<br>
I would appreciate any suggestion on this matter.<br></div></blockquote><div><br></div><div>I suspect you have a nonlinear PC. Can you send the output of -ksp_view?</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Thanks,<br>
Michele<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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></div>