[petsc-dev] segfault in SNESDestroy()

Adrian Croucher a.croucher at auckland.ac.nz
Wed May 17 22:47:59 CDT 2017


hi,

I just pulled the latest 'next' branch and am getting a segfault in 
SNESDestroy(), which didn't used to happen.

It looks like it is having trouble destroying submatrices in the 
Jacobian sub-preconditioner. The KSP in the SNES is using BCGS with ASM 
preconditioner.

The error goes away if I run in serial, or if I set the ILU fill-in 
greater than zero using e.g. -sub_pc_factor_levels 1.

The error message is below. Any clues?

- Adrian

--
[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/documentation/faq.html#valgrind
[0]PETSC ERROR: [1]PETSC ERROR: 
------------------------------------------------------------------------
[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, 
probably memory access out of range
[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[1]PETSC ERROR: or see 
http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
or try http://valgrind.org on GNU/linux and Apple Mac OS X to find 
memory corruption errors
[1]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS 
X to find memory corruption errors
[0]PETSC ERROR: likely location of problem given in stack below
[0]PETSC ERROR: ---------------------  Stack Frames 
------------------------------------
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
[0]PETSC ERROR:       INSTEAD the line number of the start of the function
[0]PETSC ERROR: [1]PETSC ERROR: likely location of problem given in 
stack below
[1]PETSC ERROR: ---------------------  Stack Frames 
------------------------------------
[1]PETSC ERROR:       is given.
[0]PETSC ERROR: [0] MatDestroy_SeqBAIJ_Submatrices line 220 
/home/acro018/software/PETSc/code/src/mat/impls/baij/seq/baij2.c
[0]PETSC ERROR: [0] MatDestroy line 1160 
/home/acro018/software/PETSc/code/src/mat/interface/matrix.c
[0]PETSC ERROR: [0] PCReset_ILU line 23 
/home/acro018/software/PETSc/code/src/ksp/pc/impls/factor/ilu/ilu.c
[0]PETSC ERROR: [0] PCReset line 75 
/home/acro018/software/PETSc/code/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: [0] KSPReset line 955 
/home/acro018/software/PETSc/code/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: [0] PCReset_ASM line 595 
/home/acro018/software/PETSc/code/src/ksp/pc/impls/asm/asm.c
[0]PETSC ERROR: [0] PCReset line 75 
/home/acro018/software/PETSc/code/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: [0] KSPReset line 955 
/home/acro018/software/PETSc/code/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
[1]PETSC ERROR:       INSTEAD the line number of the start of the function
[1]PETSC ERROR:       is given.
[1]PETSC ERROR: [1] MatDestroy_SeqBAIJ_Submatrices line 220 
/home/acro018/software/PETSc/code/src/mat/impls/baij/seq/baij2.c
[1]PETSC ERROR: [1] MatDestroy line 1160 
/home/acro018/software/PETSc/code/src/mat/interface/matrix.c
[1]PETSC ERROR: [1] PCReset_ILU line 23 
/home/acro018/software/PETSc/code/src/ksp/pc/impls/factor/ilu/ilu.c
[1]PETSC ERROR: [1] PCReset line 75 
/home/acro018/software/PETSc/code/src/ksp/pc/interface/precon.c
[0] SNESReset line 2796 
/home/acro018/software/PETSc/code/src/snes/interface/snes.c
[0]PETSC ERROR: [0] SNESDestroy line 2852 
/home/acro018/software/PETSc/code/src/snes/interface/snes.c
[0]PETSC ERROR: --------------------- Error Message 
--------------------------------------------------------------
[0]PETSC ERROR: Signal received
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: [1]PETSC ERROR: [1] KSPReset line 955 
/home/acro018/software/PETSc/code/src/ksp/ksp/interface/itfunc.c
[1]PETSC ERROR: [1] PCReset_ASM line 595 
/home/acro018/software/PETSc/code/src/ksp/pc/impls/asm/asm.c
[1]PETSC ERROR: [1] PCReset line 75 
/home/acro018/software/PETSc/code/src/ksp/pc/interface/precon.c
[1]PETSC ERROR: [1] KSPReset line 955 
/home/acro018/software/PETSc/code/src/ksp/ksp/interface/itfunc.c
[1]PETSC ERROR: [1] SNESReset line 2796 
/home/acro018/software/PETSc/code/src/snes/interface/snes.c
[1]PETSC ERROR: [1] SNESDestroy line 2852 
/home/acro018/software/PETSc/code/src/snes/interface/snes.c
[1]PETSC ERROR: --------------------- Error Message 
--------------------------------------------------------------

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611




More information about the petsc-dev mailing list