<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Miorelli:</div><div class="gmail_quote">Fixed </div><div class="gmail_quote"><a href="https://bitbucket.org/petsc/petsc/commits/a560ef987c2a1e86047c71b5951614168aab22f9">https://bitbucket.org/petsc/petsc/commits/a560ef987c2a1e86047c71b5951614168aab22f9</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">After our regression tests, I'll merge it to petsc-release.</div><div class="gmail_quote">Thanks for report it!</div><div class="gmail_quote"><br></div><div class="gmail_quote">Hong</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-family:Consolas">Dear All,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">I think there may be a bug in PETSc 3.7.0, function MatDuplicate_MPIAIJ_MatPtAP.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Whenever I call MatDuplicate on this type of matrix I'm getting SIGSEGV.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> call MatTransposeMatMult(A, A, MAT_INITIAL_MATRIX, 1.d0, AtA, ierr)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"> call MatDuplicate(AtA,MAT_COPY_VALUES,AtA2,ierr)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: ------------------------------------------------------------------------<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC 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<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: likely location of problem given in stack below<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: --------------------- Stack Frames ------------------------------------<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[0]PETSC ERROR: INSTEAD the line number of the start of the function<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[0]PETSC ERROR: is given.<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: [1] MatDuplicate_MPIAIJ_MatPtAP line 78 /state/std2/FEMI/PETSc/petsc-3.7.0/src/mat/impls/aij/mpi/mpiptap.c<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10pt;font-family:Consolas">[1]PETSC ERROR: [1] MatDuplicate line 4324 /state/std2/FEMI/PETSc/petsc-3.7.0/src/mat/interface/matrix.c<span style="color:black;background:black"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas">Federico<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(0,147,208)">______</span></b><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(106,115,123)">
</span></b><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(140,198,63)">______</span></b><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(106,115,123)">
</span></b><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(252,176,52)">______</span></b><b><span lang="IT" style="font-size:18.5pt;font-family:Arial,sans-serif;color:rgb(106,115,123)"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(64,64,64)">Federico Miorelli</span><span lang="IT"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="IT" style="color:rgb(31,73,125)">Senior R&D Geophysicist<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10pt;color:rgb(31,73,125)">Subsurface Imaging - General Geophysics
</span></b><b><span style="font-size:9pt;color:rgb(31,73,125)">Italy</span></b><span style="font-size:8pt;color:rgb(64,64,64)"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8pt;color:rgb(64,64,64)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:8pt;color:rgb(64,64,64)">CGG Electromagnetics (Italy) Srl<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><i><span lang="EN-GB" style="font-size:7pt;font-family:Arial,sans-serif;color:rgb(106,115,123)">This email and any accompanying attachments are confidential. If you received this email by mistake, please delete<br>
it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.<u></u><u></u></span></i></p>
</div>
</blockquote></div><br></div></div>