We have a memory leak in the plotting code because the class 
GenericVTKPlottable does not have a (virtual) destructor. The consequence is 
that for objects like VTKPlottableGenericFunction, their destructor is never 
called. This problem was picked up by a static analysis tool.

In GenericVTKPlottable, the destructor was commented out with the message:

    // This destructor should be uncommented, but it causes a problem           
                                                                
    // in parallel with MPI calls being made after MPI is shutdown. Needs       
                                                                
    // further investigation. 

This should have been sorted out. The problem is that the code skips over the 
plot command, and shuts down MPI before the plot code has destroyed all of its 
objects (some of which depend on MPI). We’re back in a situation where the 
automatic initialisation and finalisation of MPI isn't work. Solutions are

1. Require MPI to be initialised and finalised manually by the user (the most 
robust option)
2. Do not allow plotting with MPI
3. Something else? 

Opinions or suggestions?

Garth
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to