[petsc-users] Inquiry about the definitely lost memory

Barry Smith bsmith at petsc.dev
Fri Jun 9 11:38:14 CDT 2023


  This are MPI objects PETSc creates in  PetscInitialize(), for successful runs they should all be removed in PETSc finalize, hence they should not appear as valgrind links.

  Are you sure PetscFinalize() is called and completes?

  We'll need the exact PETSc version you are using to know exactly which MPI object is not being destroyed.


  Barry


> On Jun 9, 2023, at 12:01 PM, neil liu <liufield at gmail.com> wrote:
> 
> Dear Petsc developers, 
> 
> I am using valgrind to check the memory leak. It shows, 
> <image.png>
> Finally, I found that DMPlexrestoretrasitiveclosure can resolve this memory leak. 
> 
> My question is from the above screen shot, it seems the leak is related to MPI. How can I relate that reminder to DMPlexrestoretrasitiveclosure ?
> 
> Thanks, 
> 
> Xiaodong 



More information about the petsc-users mailing list