<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 25, 2016 at 2:39 PM, Xujun Zhao <span dir="ltr"><<a href="mailto:xzhao99@gmail.com" target="_blank">xzhao99@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Another interesting phenomenon is that it works for an iterative solver, but only failed for direct solvers(both superLU_dist and mumps). If something is not initialized correctly, why doesn't the iterative solver, for example, GMRES, throw any errors?</div></blockquote><div><br></div><div>It would of course depend on what you have not initialized, and what value was sitting in that place to begin with.</div><div>Use valgrind to clear all this up.</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 class="gmail_extra"><div class="gmail_quote">On Mon, Jul 25, 2016 at 11:50 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Jul 25, 2016 at 9:17 AM, Xujun Zhao <span dir="ltr"><<a href="mailto:xzhao99@gmail.com" target="_blank">xzhao99@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I am trying to solve my problem with a direct solver superLU_dist.</div><div>But the KSPSolve failed in the "opt" mode. I shifted to the "dbg" version and wanted to see what error info I can get from the PETSc. Surprisingly, it passed the solve and didn't output any errors in the "dbg" version. Does anyone have the similar experience? and what type of potential bugs it may have?</div></div></blockquote><div><br></div></span><div>Debugging mode initializes all variables, but as Hong says, valgrind will warn you of uninitialized variables.</div><div><br></div><div>   Matt</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br></div><div>







<p><span>--->test in StokesSolver::solve(): Start the KSP solve... </span></p>
<p><span>[0]PETSC ERROR: ------------------------------------------------------------------------</span></p>
<p><span>[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</span></p>
<p><span>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</span></p>
<p><span>[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a></span></p>
<p><span>[0]PETSC ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors</span></p>
<p><span>[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run </span></p>
<p><span>[0]PETSC ERROR: to get more information on the crash.</span></p>
<p><span>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</span></p>
<p><span>[0]PETSC ERROR: Signal received</span></p>
<p><span>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</span></p>
<p><span>[0]PETSC ERROR: Petsc Release Version 3.7.2, unknown </span></p>
<p><span>[0]PETSC ERROR: ./example-dbg on a arch-darwin-c-opt named <a href="http://mcswl091.mcs.anl.gov" target="_blank">mcswl091.mcs.anl.gov</a> by xzhao Mon Jul 25 11:10:12 2016</span></p>
<p><span>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack --download-scalapack --download-mumps --download-superlu_dist --download-hypre --download-ml --download-metis --download-parmetis --download-triangle --download-chaco --with-debugging=0</span></p>
<p><span>[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file</span></p>
<p><span>application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0</span></p><p><span><br></span></p></div></div></div>
</blockquote></span></div><span><font color="#888888"><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div data-smartmail="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>
</font></span></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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>