On Wed, May 30, 2012 at 2:29 PM, Tobias Neckel <span dir="ltr"><<a href="mailto:neckel@in.tum.de" target="_blank">neckel@in.tum.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
we recently upgraded from 3.0.0-p11 to 3.2-p7 and are facing a problem in one of our test cases: We use seqaij matrix format and GMRES with ILU dt.<br>
<br>
Knowing that the ILUdt has been replaced by superlu's version, we therefore configured our petsc installation with<br>
---<br>
-PETSC_ARCH=petsc-3.2-serial --prefix=/work_fast/liebm/<u></u>petsc-3.2-serial/ --with-debugging=0 --with-cxx=gcc --with-fc=gfortran --with-cc=gcc --download-superlu=1 --with-mpi=0<br>
----<br>
</blockquote><div><br></div><div>I know it involves another build, but turning on debugging is really essential for tracking down errors like this. Can you</div><div>reconfigure with debugging under a different PETSC_ARCH and send the trace?</div>
<div><br></div><div>  Thanks</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">resulting in a nicely compiled lib/libsuperlu_4.2.a.<br>

<br>
Also, ex52.c works (with ILU as a solver).<br>
<br>
Hence, in our code, we replaced the former single-line command<br>
        _ierr = PCFactorSetDropTolerance(...<u></u>stuff...);<br>
by the code of ex52.c:<br>
        Mat F;<br>
        _ierr = PCFactorSetMatSolverPackage(<u></u>pc,MATSOLVERSUPERLU);<br>
        _ierr = PCFactorSetUpMatSolverPackage(<u></u>pc);/* call MatGetFactor() to create F */<br>
        _ierr = PCFactorGetMatrix(pc,&F);<br>
        _ierr = MatSuperluSetILUDropTol(F,1.<u></u>0e-3);<br>
<br>
After some smooting, the compile and link works now fine, but running the test case results in a segfault; here is the corresponding valgrind output:<br>
<br>
==17405== Invalid read of size 4<br>
==17405==    at 0x1B15245: MatGetFactor (in /work_fast/liebm/workspace/p1/<u></u>src/build/debug/dim2/fluid/<u></u>peano-fluid)<br>
==17405==    by 0x1CDF709: PCFactorSetUpMatSolverPackage_<u></u>Factor (in /work_fast/liebm/workspace/p1/<u></u>src/build/debug/dim2/fluid/<u></u>peano-fluid)<br>
==17405==    by 0x1B3F7F9: PCFactorSetUpMatSolverPackage (in /work_fast/liebm/workspace/p1/<u></u>src/build/debug/dim2/fluid/<u></u>peano-fluid)<br>
==17405==    by 0x19284F5: peano::petsc::<u></u>PETScNonLinearSolver::<u></u>setupLinearSolver(_p_KSP*&, std::string, std::string, double, double, int) (PETScNonLinearSolver.cpp:365)<br>
==17405==    by 0x1926DF2: peano::petsc::<u></u>PETScNonLinearSolver::<u></u>initialize(int, int, int) (PETScNonLinearSolver.cpp:242)<br>
==17405==    by 0x901225: peano::fluid::<u></u>NonLinearTrivialgridFluidSimul<u></u>ation::<u></u>implementSetInitialValue(bool, double, int, double) (<u></u>NonLinearTrivialgridFluidSimul<u></u>ation.cpp:540)<br>
==17405==    by 0x17AE3C8: peano::fluid::<u></u>SteadyStateIntegrationTestChan<u></u>nel::<u></u>testTrivialgrid3x3ComputeNavie<u></u>rStokesFunction() (<u></u>SteadyStateIntegrationTestChan<u></u>nel.cpp:114)<br>
==17405==    by 0x17B28A8: peano::fluid::<u></u>SteadyStateIntegrationTestChan<u></u>nel::run() (<u></u>SteadyStateIntegrationTestChan<u></u>nel.cpp:484)<br>
==17405==    by 0x19BDCB3: tarch::tests::<u></u>TestCaseCollection::run() (TestCaseCollection.cpp:42)<br>
==17405==    by 0x19BDCB3: tarch::tests::<u></u>TestCaseCollection::run() (TestCaseCollection.cpp:42)<br>
==17405==    by 0x408A9D: peano::<u></u>IntegrationTestCaseRunner::<u></u>run(tarch::configuration::<u></u>IntegrationTestConfiguration const&) (IntegrationTestCaseRunner.<u></u>cpp:127)<br>
==17405==    by 0x412C2E: main (main.cpp:205)<br>
==17405==  Address 0x1e8 is not stack'd, malloc'd or (recently) free'd<br>
==17405==<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#valgrind[0]PETSC" target="_blank">http://www.mcs.anl.gov/petsc/<u></u>petsc-as/documentation/faq.<u></u>html#valgrind[0]PETSC</a> 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<br>

[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run<br>
[0]PETSC ERROR: to get more information on the crash.<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------<u></u>------<br>
[0]PETSC ERROR: Signal received!<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 7, Thu Mar 15 09:30:51 CDT 2012<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: ./build/debug/dim2/fluid/<u></u>peano-fluid on a petsc-3.2 named atsccs58 by liebm Wed May 30 20:06:30 2012<br>
[0]PETSC ERROR: Libraries linked from /work_fast/liebm/petsc-3.2-<u></u>serial/lib<br>
[0]PETSC ERROR: Configure run at Tue May 29 21:05:34 2012<br>
[0]PETSC ERROR: Configure options --PETSC_ARCH=petsc-3.2-serial --prefix=/work_fast/liebm/<u></u>petsc-3.2-serial/ --with-debugging=0 --with-cxx=gcc --with-fc=gfortran --with-cc=gcc --download-superlu=1 --with-mpi=0<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>------------<br>
[0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file<br>
<br>
<br>
Did we miss something (keeping in mind that we use ILU now as a preconditioner in combination with GMRES)? Any suggestions are warmly welcome ;-).<br>
<br>
Thanks in advance and best regards<span class="HOEnZb"><font color="#888888"><br>
Tobias<br>
</font></span></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<br>