leaks in multiple calls for preallocating AIJ matrices

Lisandro Dalcin dalcinl at gmail.com
Tue Oct 23 14:19:53 CDT 2007


Of course, the space that can be reutilized are the arrays with
preallocation info, not the ones with actual matrix entries (a,i,j).

On 10/23/07, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> Looking at the actual code, it seems there is not need to actually
> reallocate space, the same space can be reutilized. Do you think I'm
> missing something?
>
> And please, tell me: should I fix this in release-2.3.3? I believe
> this will not impact previous user code in any way.
>
>
>
> On 10/23/07, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> >   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?
> > >
> > >
> > >
> >
> >
>
>
> --
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
>


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-dev mailing list