[petsc-users] Debugging a petsc code

Stefano Zampini stefano.zampini at gmail.com
Mon Jan 30 12:48:12 CST 2017


It just reports that you have a memory leak. Probably you did not call VecDestroy on the Vec created at at initpetsc_ in line 2066 of all.f95.

> On Jan 30, 2017, at 8:04 PM, 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 ?
> 
> Thanks
> praveen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170130/40b4aa71/attachment.html>


More information about the petsc-users mailing list