[petsc-dev] segfault in SNESDestroy()

Hong hzhang at mcs.anl.gov
Fri May 19 10:51:47 CDT 2017


Adrian,
It is a bug in our ilu0 for seqbaij matrix
https://bitbucket.org/petsc/petsc/commits/2eb5df998544f7f4e52ff7268aa93a795e17258c

I'll add some tests to petsc, then push it to next for regression tests,
finally the fix will be merged to master.

Thanks for your report.

Hong


On Thu, May 18, 2017 at 4:58 PM, Hong <hzhang at mcs.anl.gov> wrote:

> Adrian,
> Ignore my previous email.
> I can reproduce it using
> petsc/src/snes/examples/tutorials
> mpiexec -n 2 ./ex19 -pc_type asm -dm_mat_type baij
>
> I'll let you the fix.
>
> Hong
>
> On Thu, May 18, 2017 at 4:33 PM, Hong <hzhang at mcs.anl.gov> wrote:
>
>> Adrian,
>> Adding option '-mat_type aij', do you still see this problem?
>>
>> Is possible to send us a simple code that produces this error?
>> I cannot reproduce it using petsc examples.
>>
>> Hong
>>
>>
>> On Wed, May 17, 2017 at 10:50 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>
>>>
>>>    Adrian,
>>>
>>>     There is a good chance this is a bug that got introduced while
>>> optimizing the scalability of the ASM preconditioner.
>>>
>>>    Hong,
>>>
>>>      Can you try to reproduce the crash by using the options below on
>>> one of the PETSc test examples.
>>>
>>>    Thanks
>>>
>>>     Barry
>>>
>>> > On May 17, 2017, at 10:47 PM, Adrian Croucher <
>>> a.croucher at auckland.ac.nz> wrote:
>>> >
>>> > 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/d
>>> ocumentation/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/d
>>> ocumentation/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/c
>>> ode/src/mat/interface/matrix.c
>>> > [0]PETSC ERROR: [0] PCReset_ILU line 23 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/impls/factor/ilu/ilu.c
>>> > [0]PETSC ERROR: [0] PCReset line 75 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/interface/precon.c
>>> > [0]PETSC ERROR: [0] KSPReset line 955 /home/acro018/software/PETSc/c
>>> ode/src/ksp/ksp/interface/itfunc.c
>>> > [0]PETSC ERROR: [0] PCReset_ASM line 595 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/impls/asm/asm.c
>>> > [0]PETSC ERROR: [0] PCReset line 75 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/interface/precon.c
>>> > [0]PETSC ERROR: [0] KSPReset line 955 /home/acro018/software/PETSc/c
>>> ode/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/c
>>> ode/src/mat/interface/matrix.c
>>> > [1]PETSC ERROR: [1] PCReset_ILU line 23 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/impls/factor/ilu/ilu.c
>>> > [1]PETSC ERROR: [1] PCReset line 75 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/interface/precon.c
>>> > [0] SNESReset line 2796 /home/acro018/software/PETSc/c
>>> ode/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/d
>>> ocumentation/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/c
>>> ode/src/ksp/pc/impls/asm/asm.c
>>> > [1]PETSC ERROR: [1] PCReset line 75 /home/acro018/software/PETSc/c
>>> ode/src/ksp/pc/interface/precon.c
>>> > [1]PETSC ERROR: [1] KSPReset line 955 /home/acro018/software/PETSc/c
>>> ode/src/ksp/ksp/interface/itfunc.c
>>> > [1]PETSC ERROR: [1] SNESReset line 2796 /home/acro018/software/PETSc/c
>>> ode/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
>>> >
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170519/18ee8436/attachment.html>


More information about the petsc-dev mailing list