[petsc-users] Crash in MatDuplicate_MPIAIJ_MatPtAP

Hong hzhang at mcs.anl.gov
Fri May 6 10:09:13 CDT 2016


Miorelli:
I can reproduce it. I'll fix it and get back to you.
Hong

Dear All,
>
>
>
> I think there may be a bug in PETSc 3.7.0, function
> MatDuplicate_MPIAIJ_MatPtAP.
>
> Whenever I call MatDuplicate on this type of matrix I'm getting SIGSEGV.
>
>
>
> The bug is easily reproduced with the attached file. This is just ex2f
> from KSP, where I added two additional lines to create an A^T A matrix
> which is then duplicated.
>
>
>
>       call MatTransposeMatMult(A, A, MAT_INITIAL_MATRIX, 1.d0, AtA, ierr)
>
>       call MatDuplicate(AtA,MAT_COPY_VALUES,AtA2,ierr)
>
>
>
>
>
> [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
>
> [1]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS
> X to find memory corruption errors
>
> [1]PETSC ERROR: likely location of problem given in stack below
>
> [1]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:       is given.
>
> [1]PETSC ERROR: [1] MatDuplicate_MPIAIJ_MatPtAP line 78
> /state/std2/FEMI/PETSc/petsc-3.7.0/src/mat/impls/aij/mpi/mpiptap.c
>
> [1]PETSC ERROR: [1] MatDuplicate line 4324
> /state/std2/FEMI/PETSc/petsc-3.7.0/src/mat/interface/matrix.c
>
>
>
>
>
> Thanks,
>
>
>
> Federico
>
>
>
>
>
> *______* *______* *______*
>
> Federico Miorelli
>
>
>
> Senior R&D Geophysicist
>
> *Subsurface Imaging - General Geophysics **Italy*
>
>
>
> CGG Electromagnetics (Italy) Srl
>
>
> *This email and any accompanying attachments are confidential. If you
> received this email by mistake, please delete it from your system. Any
> review, disclosure, copying, distribution, or use of the email by others is
> strictly prohibited.*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160506/f0af4452/attachment-0001.html>


More information about the petsc-users mailing list