<div dir="ltr"><div dir="ltr">On Mon, Nov 21, 2022 at 2:44 PM Nicholas Arnold-Medabalimi <<a href="mailto:narnoldm@umich.edu">narnoldm@umich.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I have been using valgrind with the mem checker. I should have mentioned that. My question was probably ill posed. I'm more asking about is how linking petsc affects the stack trace provided by the compiler side checks. Valgrind is great but sometimes is a little ambiguous whereas the compile side check bounds will usually be more specific so I was curious if there is a way to change the petsc stack trace effect.<br></div></blockquote><div><br></div><div>I am not sure I understand. Valgrind should indicate precisely the line number, unless you have not compiled/linked with debugging symbols.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 21, 2022 at 2:39 PM Sanjay Govindjee <<a href="mailto:s_g@berkeley.edu" target="_blank">s_g@berkeley.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Other options I have found useful:<br>
<br>
-v --leak-check=full --show-reachable=yes<br>
<br>
On 11/21/22 11:27 AM, Satish Balay via petsc-users wrote:<br>
> valgrind is a useful tool to learn to use..<br>
><br>
> valgrind --tool=memcheck ./executable<br>
><br>
> Satish<br>
><br>
> On Mon, 21 Nov 2022, Nicholas Arnold-Medabalimi wrote:<br>
><br>
>> Hi Petsc users<br>
>><br>
>> I'm working on an integration of Petsc into an existing fortran code. Most<br>
>> of my memory debugging is very primitive and is usually accomplished using<br>
>> the -check bounds option in the compiler. However with Petsc attached the<br>
>> stack trace becomes much more opaque compared to the original code. At<br>
>> least as far as I can tell the error becomes much harder to pin down (just<br>
>> pointing to libpetsc.so). Any assistance in getting more informative error<br>
>> messages or checks would be much appreciated.<br>
>><br>
>> Sincerely<br>
>> Nicholas<br>
>><br>
>><br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><font color="#000000">Nicholas Arnold-Medabalimi<br><br></font><span style="font-family:sans-serif;font-size:14px">Ph.D. Candidate</span><font color="#000000"><br>Computational Aeroscience Lab<br>University of Michigan</font></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>