<div dir="ltr">Use valgrind like it says and find out where memory is being overwritten.<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 11:25 AM, Saurabh Chawdhary <span dir="ltr"><<a href="mailto:saurabh.chawdhary@gmail.com" target="_blank">saurabh.chawdhary@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry here is the Error trace I get on running on 1 processor:<div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</div><div>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</div><div>[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]PETSC</a> 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</div><div>[0]PETSC ERROR: PetscMallocValidate: error detected at PetscSignalHandlerDefault() line 149 in src/sys/error/signal.c</div><div>[0]PETSC ERROR: Memory at address 0x7fe4fdc6f010 is corrupted</div><div>[0]PETSC ERROR: Probably write past beginning or end of array</div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Memory corruption!</div><div>[0]PETSC ERROR: !</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Release Version 3.4.5, Jun, 29, 2014</div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div><div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ../IB-AMRS/test1 on a arch-linux2-c-debug named <a href="http://aegean.safl.umn.edu" target="_blank">aegean.safl.umn.edu</a> by chaw0023 Mon Mar 9 11:24:50 2015</div><div>[0]PETSC ERROR: Libraries linked from /home/chaw0023/software/aegean/debug/petsc-3.4.5/arch-linux2-c-debug/lib</div><div>[0]PETSC ERROR: Configure run at Thu Feb 19 12:22:29 2015</div><div>[0]PETSC ERROR: Configure options --with-mpi-dir=/safl/software/aegean/openmpi/1.5.5/gcc/4.7.0-fix --with-blas-lapack-dir=/safl/software/x86_64/acml/4.4.0/gfortran64 --download-hypre=yes --with-shared-libraries=0 --with-debugging=1</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: PetscMallocValidate() line 137 in src/sys/memory/mtr.c</div><div>[0]PETSC ERROR: PetscSignalHandlerDefault() line 149 in src/sys/error/signal.c</div><div>--------------------------------------------------------------------------</div><div>MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD</div><div>with errorcode 0.</div><div><br></div><div>NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.</div><div>You may or may not see output from other processes, depending on</div><div>exactly when Open MPI kills them.</div><div>--------------------------------------------------------------------------</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 10:55 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Saurabh Chawdhary <<a href="mailto:saurabh.chawdhary@gmail.com" target="_blank">saurabh.chawdhary@gmail.com</a>> writes:<br>
<br>
> Hi,<br>
> I used to work with petsc and running everything fine thus far. But then I<br>
> decided to run it with a debugger. To this end I re-installed petsc<br>
> --with-debugging=1. I can compile the code with this new petsc installation<br>
> but when I run it I get Segmentation fault error. Same code compiled with<br>
> the old without debug option runs perfectly fine.<br>
> Is something wrong with my new installation?<br>
<br>
</span>Run in a debugger and send the stack trace.<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">सौरभ चौधरी </div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div>