<div dir="ltr"><div>As it is now, if you create any object and use PetscObjectRegisterDestroy, the output from log_view may be misleading, as it will show something like this</div><div><br></div><div><br></div><div>Memory usage is given in bytes:</div><div><br></div><div>Object Type Creations Destructions Memory Descendants' Mem.</div><div>Reports information only for process 0.</div><div><br></div><div>--- Event Stage 0: Main Stage</div><div><br></div><div> Index Set 237 237 310852 0.<br></div><div> IS L to G Mapping 53 35 75260 0.</div><div> Application Order 2 2 2352 0.</div><div> Vector 617 582 1312048 0.</div><div> Vector Scatter 41 23 15088 0.</div><div>.....</div><div><br></div><div><br></div><div>In this example, the objects registered for destroy where also composed with l2g maps and scatters. </div><div>So the user may think of having memory leaks somewhere. But running with -malloc_dump (or under valgrind --leak-check=full) the output is clean.</div><div>This is because PetscObjectRegisterDestroyAll is called after PetscLogView in PetscFinalize().</div><div><br></div><div>What if the reason to call PetscObjectRegisterDestroyAll after PetscLogView? Just for having PETSC_VIEWER_STDOUT_WORLD available?<br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature">Stefano</div>
</div>