<div class="gmail_quote">On Wed, Jun 1, 2011 at 18:05, Brad Aagaard <span dir="ltr"><<a href="mailto:baagaard@usgs.gov">baagaard@usgs.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":5tp">Valgrind is suggesting that I may have a memory leak associated with PetscViewer objects in PyLith. I created a simple example (attached) that reproduces the valgrind message.<br></div></blockquote><div><br>
</div><div>Most of your messages are just because Open MPI is leaky (harmlessly, except for the valgrind noise). The real leak is because PetscViewerBinaryOpen() creates a new viewer. Its implementation looks like the following.</div>
<div><br></div><div> ierr = PetscViewerCreate(comm,binv);CHKERRQ(ierr);</div><div> ierr = PetscViewerSetType(*binv,PETSCVIEWERBINARY);CHKERRQ(ierr);</div><div> ierr = PetscViewerFileSetMode(*binv,type);CHKERRQ(ierr);</div>
<div> ierr = PetscViewerFileSetName(*binv,name);CHKERRQ(ierr);</div></div>