leaks in multiple calls for preallocating AIJ matrices

Barry Smith bsmith at mcs.anl.gov
Tue Oct 23 14:02:10 CDT 2007


  Lisandro,

    I agree we should support multiple calls (or at worst generate an
error on the second call). Presumably the specific 
MatXXXYYYSetPreallocation() routines would simply free up their
current points and then (as it does now) allocate the appropriate new
space. Feel free to add this.

   Barry


On Mon, 22 Oct 2007, Lisandro Dalcin wrote:

> Currently, making sucessive calls for preallocating AIJ matrices seem
> to originate memory leaks.
> 
> How should this be corrected? I would prefer that this is a valid
> operation, and fix appropriate routines to deallocate/reuse previous
> memory, and set the new user-specified preallocation data.
> 
> Other point: should this fix go to release-2.3.3?
> 
> 
> 




More information about the petsc-dev mailing list