On Apr 10, 2011, at 1:06 PM, Jed Brown wrote:

> 2011/4/10 Gong Ding <gdiso at ustc.edu>
> This is the patch file to aij.c, which will release excessively preallocated 
> memory at MatAssemblyEnd.
> It had been tested in the past several months, both for serial and parallel.
> 
> Hope this patch can be accepted.
> 
> I'm not sure we can do this unconditionally because it can significantly 
> increase the peak memory usage. The most common case (I think) is that 
> preallocation is only slightly more than necessary in which case the extra 
> space is not very significant. Do we need to add a MatOption for this?

   It has to be made optional in some way. Using the MatSetOption() approach 
seems a reasonable way to make it optional. So I would ask Gong Ding to make it 
optional and submit a new patch when that is done.

    Thanks

    Barry



Reply via email to