[petsc-users] false-positive leak report in log_view?

Matthew Knepley knepley at gmail.com
Wed Aug 3 09:59:01 CDT 2016


On Tue, Aug 2, 2016 at 12:40 PM, Mohammad Mirzadeh <mirzadeh at gmail.com>
wrote:

> I often use the memory usage information in log_view as a way to check on
> memory leaks and so far it has worked perfect. However, I had long noticed
> a false-positive report in memory leak for Viewers, i.e. destruction count
> is always one less than creation.
>

Yes, I believe that is the Viewer being used to print this information.


> Today, I noticed what seems to be a second one. If you use VecView to
> write the same DA to vtk, i.e. call VecView(A, vtk); twice, it also report
> a memory leak for vectors, vecscatters, dm, etc. I am calling this a
> false-positive since the code is valgrind-clean.
>
> Is this known/expected?
>

The VTK viewers have to hold everything they output until they are
destroyed since the format does not allow immediate writing.
I think the VTK viewer is not destroyed at the time of this output. Can you
make a small example that does this?

I have switched to HDF5 and XDMF due to the limitations of VTK format.

  Thanks,

     Matt


> Here's the relevant bit from log_view:
>
> --- Event Stage 0: Main Stage
>
>               Vector     8              7       250992     0.
>       Vector Scatter     2              0            0     0.
>     Distributed Mesh     2              0            0     0.
> Star Forest Bipartite Graph     4              0            0     0.
>      Discrete System     2              0            0     0.
>            Index Set     4              4        83136     0.
>    IS L to G Mapping     2              0            0     0.
>               Viewer     2              1          784     0.
>
> ========================================================================================================================
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160803/5f3cf126/attachment-0001.html>


More information about the petsc-users mailing list