<div dir="ltr">-malloc_test does not report anything.<div><br></div><div>Freeing all petsc vectors got rid of those error.</div><div><br></div><div>Now I see only MPI related errors like this</div><div><br></div><div><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686== 376 (232 direct, 144 indirect) bytes in 1 blocks are definitely lost in loss record 148 of 159</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    at 0x4C2B0AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x660D7EF: mca_bml_r2_add_procs (in /home/spack/opt/spack/linux-opensuse20161217-x86_64/gcc-6/openmpi-2.0.1-asdjmd22cnyktv2athcx3ouhrozknk22/lib64/libmpi.so.20.0.1)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x66D11CA: mca_pml_ob1_add_procs (in /home/spack/opt/spack/linux-opensuse20161217-x86_64/gcc-6/openmpi-2.0.1-asdjmd22cnyktv2athcx3ouhrozknk22/lib64/libmpi.so.20.0.1)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x65CE906: ompi_mpi_init (in /home/spack/opt/spack/linux-opensuse20161217-x86_64/gcc-6/openmpi-2.0.1-asdjmd22cnyktv2athcx3ouhrozknk22/lib64/libmpi.so.20.0.1)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x65ED082: PMPI_Init (in /home/spack/opt/spack/linux-opensuse20161217-x86_64/gcc-6/openmpi-2.0.1-asdjmd22cnyktv2athcx3ouhrozknk22/lib64/libmpi.so.20.0.1)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x6352D97: MPI_INIT (in /home/spack/opt/spack/linux-opensuse20161217-x86_64/gcc-6/openmpi-2.0.1-asdjmd22cnyktv2athcx3ouhrozknk22/lib64/libmpi_mpifh.so.20.0.0)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x4F393C6: petscinitialize_ (zstart.c:320)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x417718: MAIN__ (all.f95:1385)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)">








</p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    by 0x4184B2: main (all.f95:1366)</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div><div>Does this indicate some error in my code or my MPI.</div><div><br></div><div>This is the valgrind summary</div><div><br></div><div><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686== LEAK SUMMARY:</span></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    definitely lost: 1,378 bytes in 14 blocks</span></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    indirectly lost: 64,882 bytes in 88 blocks</span></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==      possibly lost: 0 bytes in 0 blocks</span></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==    still reachable: 32,984 bytes in 139 blocks</span></p>
<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">==33686==         suppressed: 0 bytes in 0 blocks</span></p><p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><br></p>I have attached the full valgrid output.<p style="margin:0px;font-size:13px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><br></p></div><div>Thanks</div><div>praveen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 31, 2017 at 12:18 AM, Stefano Zampini <span dir="ltr"><<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@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 style="word-wrap:break-word">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.<div><div class="h5"><div><br><div><blockquote type="cite"><div>On Jan 30, 2017, at 8:04 PM, Praveen C <<a href="mailto:cpraveen@gmail.com" target="_blank">cpraveen@gmail.com</a>> wrote:</div><br class="m_-983345306811932845Apple-interchange-newline"><div><div dir="ltr">Dear all<div><br></div><div>I am trying to find a possible bug in my fortran petsc code. Running valgrid I see messages like this</div><div><br></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499== 1,596 (1,512 direct, 84 indirect) bytes in 1 blocks are definitely lost in loss record 174 of 194</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    at 0x4C2D636: memalign (in /usr/lib64/valgrind/vgpreload_<wbr>memcheck-amd64-linux.so)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x4F0F178: PetscMallocAlign (mal.c:28)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x4FF7E82: VecCreate (veccreate.c:37)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x4FDF198: VecCreateSeqWithArray (bvec2.c:946)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x4FE442E: veccreateseqwitharray_ (zbvec2f.c:12)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x406921: initpetsc_ (all.f95:2066)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x4035B1: run_ (all.f95:2817)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x41760C: MAIN__ (all.f95:1383)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">==28499==    by 0x417D08: main (all.f95:1330)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div>Does this indicate some bug in my code ?</div><div><br></div><div>Thanks</div><div>praveen</div></div>
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>