[petsc-users] Debugging a petsc code

Matthew Knepley knepley at gmail.com
Mon Jan 30 11:34:36 CST 2017


On Mon, Jan 30, 2017 at 11:04 AM, Praveen C <cpraveen at gmail.com> wrote:

> Dear all
>
> I am trying to find a possible bug in my fortran petsc code. Running
> valgrid I see messages like this
>
> ==28499== 1,596 (1,512 direct, 84 indirect) bytes in 1 blocks are
> definitely lost in loss record 174 of 194
>
> ==28499==    at 0x4C2D636: memalign (in /usr/lib64/valgrind/vgpreload_
> memcheck-amd64-linux.so)
>
> ==28499==    by 0x4F0F178: PetscMallocAlign (mal.c:28)
>
> ==28499==    by 0x4FF7E82: VecCreate (veccreate.c:37)
>
> ==28499==    by 0x4FDF198: VecCreateSeqWithArray (bvec2.c:946)
>
> ==28499==    by 0x4FE442E: veccreateseqwitharray_ (zbvec2f.c:12)
>
> ==28499==    by 0x406921: initpetsc_ (all.f95:2066)
>
> ==28499==    by 0x4035B1: run_ (all.f95:2817)
>
> ==28499==    by 0x41760C: MAIN__ (all.f95:1383)
>
> ==28499==    by 0x417D08: main (all.f95:1330)
>
>
> Does this indicate some bug in my code ?
>

It you run with -malloc_test, and it does not report unfreed objects, then
everything is fine.

   Matt


> Thanks
> praveen
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170130/c44eba57/attachment.html>


More information about the petsc-users mailing list