[petsc-users] Growing memory use with VecGhostUpdate

Praveen C cpraveen at gmail.com
Tue Dec 26 09:31:07 CST 2017


I did this

   do i=1,10000000
   call VecGhostUpdateBegin(p%v_u, INSERT_VALUES, SCATTER_FORWARD, &
                            ierr); CHKERRQ(ierr)
   call VecGhostUpdateEnd  (p%v_u, INSERT_VALUES, SCATTER_FORWARD, &
                            ierr); CHKERRQ(ierr)
   call PetscMallocGetCurrentUsage(space, ierr); CHKERRQ(ierr)
   if(rank==0) print*,space
   enddo

and the value printed is zero, so this means the problem must come from mpi. Since I am not directly using MPI, what should I look for with valgrind and how will that help to solve this ?

There is a recent issue related to memory leak

https://github.com/open-mpi/ompi/issues/4567 <https://github.com/open-mpi/ompi/issues/4567>

Thank you
praveen

> On 26-Dec-2017, at 7:33 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> First check PetscMallocGetCurrentUsage() in the loop to confirm that
> there is no leak of PetscMalloc()'ed memory.  That would mean the leak
> comes from elsewhere, maybe MPI.
> 
> Then get a stack trace for the leaking memory (e.g., using valgrind
> --tool=massif or a debugger)?

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


More information about the petsc-users mailing list