[petsc-users] possible memory leak

Smith, Barry F. bsmith at mcs.anl.gov
Tue Dec 24 11:25:34 CST 2019


  I see,

  What version of MPI are you using? Some versions of OpenMPI have serious memory leaks. Maybe try the exact same version of OpenMPI you used previously with success?

  You can also use valgrind with some options to track the memory usage.

  Barry


> On Dec 24, 2019, at 10:03 AM, Marius Buerkle <mbuerkle at web.de> wrote:
> 
> I see. For actual production runs on 512 processes with larger matrices this causes eventually a seg fault due to running out of memory. I am not sure but think this did not happen with some "older" version of PETSC. I am not sure which one (or which revision), I wil check it.
>  
>  
> Gesendet: Mittwoch, 25. Dezember 2019 um 00:53 Uhr
> Von: "Smith, Barry F." <bsmith at mcs.anl.gov>
> An: "Marius Buerkle" <mbuerkle at web.de>
> Cc: "Mark Adams" <mfadams at lbl.gov>, "petsc-usersmcs.anl.gov" <petsc-users at mcs.anl.gov>
> Betreff: Re: [petsc-users] possible memory leak
> 
> There are no leaks but it appears what is happening is that rather than recycle the memory PETSc is returning to the system the system is generating new space as needed. Since the old PETSc pages are never used again this should be harmless.
> 
> Barry
> 
> 
> 
> > On Dec 24, 2019, at 9:47 AM, Marius Buerkle <mbuerkle at web.de> wrote:
> >
> > thanks for the swift reply. This didn't give any output.
> >
> >
> > Gesendet: Dienstag, 24. Dezember 2019 um 23:56 Uhr
> > Von: "Mark Adams" <mfadams at lbl.gov>
> > An: "Marius Buerkle" <mbuerkle at web.de>
> > Cc: "petsc-usersmcs.anl.gov" <petsc-users at mcs.anl.gov>
> > Betreff: Re: [petsc-users] possible memory leak
> > Try running with -malloc_debug
> >
> > This should print out where unfreed memory was allocated. See what pops up.
> >
> > Mark
> >
> > On Tue, Dec 24, 2019 at 2:27 AM Marius Buerkle <mbuerkle at web.de> wrote:
> > Hi,
> >
> >
> > In my code I create and destroy during one run a lot of MPIAIJ matrices and it seems that not all memory is freed when I destroy the matrices. Moreover, it looks like the amount of “disappearing” memory increases with the number of processes. I am not so sure if I am doing something wrong or if it is really a memory leak. I have attached a simple reproducer.
> >
> >
> > Best,
> >
> > Marius
> >
>  



More information about the petsc-users mailing list