[petsc-users] problems using ilu dt of superlu

Tobias Neckel neckel at in.tum.de
Wed May 30 13:29:13 CDT 2012


Hello,

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.

Knowing that the ILUdt has been replaced by superlu's version, we 
therefore configured our petsc installation with
---
-PETSC_ARCH=petsc-3.2-serial --prefix=/work_fast/liebm/petsc-3.2-serial/ 
--with-debugging=0 --with-cxx=gcc --with-fc=gfortran --with-cc=gcc 
--download-superlu=1 --with-mpi=0
----
resulting in a nicely compiled lib/libsuperlu_4.2.a.

Also, ex52.c works (with ILU as a solver).

Hence, in our code, we replaced the former single-line command
         _ierr = PCFactorSetDropTolerance(...stuff...);
by the code of ex52.c:
         Mat F;
         _ierr = PCFactorSetMatSolverPackage(pc,MATSOLVERSUPERLU);
         _ierr = PCFactorSetUpMatSolverPackage(pc);/* call 
MatGetFactor() to create F */
         _ierr = PCFactorGetMatrix(pc,&F);
         _ierr = MatSuperluSetILUDropTol(F,1.0e-3);

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:

==17405== Invalid read of size 4
==17405==    at 0x1B15245: MatGetFactor (in 
/work_fast/liebm/workspace/p1/src/build/debug/dim2/fluid/peano-fluid)
==17405==    by 0x1CDF709: PCFactorSetUpMatSolverPackage_Factor (in 
/work_fast/liebm/workspace/p1/src/build/debug/dim2/fluid/peano-fluid)
==17405==    by 0x1B3F7F9: PCFactorSetUpMatSolverPackage (in 
/work_fast/liebm/workspace/p1/src/build/debug/dim2/fluid/peano-fluid)
==17405==    by 0x19284F5: 
peano::petsc::PETScNonLinearSolver::setupLinearSolver(_p_KSP*&, 
std::string, std::string, double, double, int) 
(PETScNonLinearSolver.cpp:365)
==17405==    by 0x1926DF2: 
peano::petsc::PETScNonLinearSolver::initialize(int, int, int) 
(PETScNonLinearSolver.cpp:242)
==17405==    by 0x901225: 
peano::fluid::NonLinearTrivialgridFluidSimulation::implementSetInitialValue(bool, 
double, int, double) (NonLinearTrivialgridFluidSimulation.cpp:540)
==17405==    by 0x17AE3C8: 
peano::fluid::SteadyStateIntegrationTestChannel::testTrivialgrid3x3ComputeNavierStokesFunction() 
(SteadyStateIntegrationTestChannel.cpp:114)
==17405==    by 0x17B28A8: 
peano::fluid::SteadyStateIntegrationTestChannel::run() 
(SteadyStateIntegrationTestChannel.cpp:484)
==17405==    by 0x19BDCB3: tarch::tests::TestCaseCollection::run() 
(TestCaseCollection.cpp:42)
==17405==    by 0x19BDCB3: tarch::tests::TestCaseCollection::run() 
(TestCaseCollection.cpp:42)
==17405==    by 0x408A9D: 
peano::IntegrationTestCaseRunner::run(tarch::configuration::IntegrationTestConfiguration 
const&) (IntegrationTestCaseRunner.cpp:127)
==17405==    by 0x412C2E: main (main.cpp:205)
==17405==  Address 0x1e8 is not stack'd, malloc'd or (recently) free'd
==17405==
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see 
http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#valgrind[0]PETSC 
ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to 
find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, 
and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: --------------------- Error Message 
------------------------------------
[0]PETSC ERROR: Signal received!
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 7, Thu Mar 15 
09:30:51 CDT 2012
[0]PETSC ERROR: See docs/changes/index.html for recent updates.
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[0]PETSC ERROR: See docs/index.html for manual pages.
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: ./build/debug/dim2/fluid/peano-fluid on a petsc-3.2 
named atsccs58 by liebm Wed May 30 20:06:30 2012
[0]PETSC ERROR: Libraries linked from /work_fast/liebm/petsc-3.2-serial/lib
[0]PETSC ERROR: Configure run at Tue May 29 21:05:34 2012
[0]PETSC ERROR: Configure options --PETSC_ARCH=petsc-3.2-serial 
--prefix=/work_fast/liebm/petsc-3.2-serial/ --with-debugging=0 
--with-cxx=gcc --with-fc=gfortran --with-cc=gcc --download-superlu=1 
--with-mpi=0
[0]PETSC ERROR: 
------------------------------------------------------------------------
[0]PETSC ERROR: User provided function() line 0 in unknown directory 
unknown file


Did we miss something (keeping in mind that we use ILU now as a 
preconditioner in combination with GMRES)? Any suggestions are warmly 
welcome ;-).

Thanks in advance and best regards
Tobias


More information about the petsc-users mailing list