[petsc-users] Petsc Fortran Memory stack trace

Matthew Knepley knepley at gmail.com
Mon Nov 21 13:46:38 CST 2022


On Mon, Nov 21, 2022 at 2:44 PM Nicholas Arnold-Medabalimi <
narnoldm at umich.edu> wrote:

> 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.
>

I am not sure I understand. Valgrind should indicate precisely the line
number, unless you have not compiled/linked with debugging symbols.

  Thanks,

     Matt


> Thanks
>
> On Mon, Nov 21, 2022 at 2:39 PM Sanjay Govindjee <s_g at berkeley.edu> wrote:
>
>> Other options I have found useful:
>>
>> -v --leak-check=full --show-reachable=yes
>>
>> On 11/21/22 11:27 AM, Satish Balay via petsc-users wrote:
>> > valgrind is a useful tool to learn to use..
>> >
>> > valgrind --tool=memcheck ./executable
>> >
>> > Satish
>> >
>> > On Mon, 21 Nov 2022, Nicholas Arnold-Medabalimi wrote:
>> >
>> >> Hi Petsc users
>> >>
>> >> I'm working on an integration of Petsc into an existing fortran code.
>> Most
>> >> of my memory debugging is very primitive and is usually accomplished
>> using
>> >> the -check bounds option in the compiler. However with Petsc attached
>> the
>> >> stack trace becomes much more opaque compared to the original code. At
>> >> least as far as I can tell the error becomes much harder to pin down
>> (just
>> >> pointing to libpetsc.so). Any assistance in getting more informative
>> error
>> >> messages or checks would be much appreciated.
>> >>
>> >> Sincerely
>> >> Nicholas
>> >>
>> >>
>>
>>
>
> --
> Nicholas Arnold-Medabalimi
>
> Ph.D. Candidate
> Computational Aeroscience Lab
> University of Michigan
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221121/6664b428/attachment.html>


More information about the petsc-users mailing list