[petsc-users] memory leaks
Jed Brown
jed at 59A2.org
Wed Oct 13 12:10:07 CDT 2010
On Wed, Oct 13, 2010 at 18:56, Luke Bloy <luke.bloy at gmail.com> wrote:
> Hi,
>
> I've had some issues with petsc and slepc recently where functionality would
> stop working following a recompilation of my code, after unrelated code was
> changed. This suggested to me a memory leak somewhere.
>
> After some investigation, it seems that there is a leak in petscInitialize,
> seemingly coming from openmpi. I'm attaching the output of valgrind and a
> basic executable calling petsciInitialize() and petscFinalize. I'm running
> on this an ubuntu 10.04 machine with petsc 3.0.0 and openMPI (1.4.1)
> installed from the repositiories. Although this problem is also evident on
> machines with petsc(3.0.0) and mpi(1.3) installed from source.
Is it possible that you upgraded Open MPI without rebuilding PETSc?
You can change affinity settings through mpiexec, but this looks like
an MPI issue. What happens if you just run a plain MPI program
(without PETSc)? The address of 0x0 is what concerns me, there are a
few places where buffers are mis-marked as uninitialized,
uninitialized memory is used in a harmless way, or memory is
(intentionally) leaked. While I like a lot of things about Open MPI,
I wish they would fix these spurious warnings so that we can debug
application code without that noise. I have two MPI installations and
switch to MPICH2 if I need it to be valgrind-clean. Note that MPICH2
handles communicators differently so (by default) you won't see
anything about certain leaked communicators. I also have a few
valgrind rules so the most common Open MPI noise is suppressed.
The real bug you are hunting is almost certainly elsewhere.
Jed
More information about the petsc-users
mailing list