[petsc-dev] writing PETSc code with no memory leaks
Satish Balay
balay at mcs.anl.gov
Tue May 10 15:53:42 CDT 2011
On Tue, 10 May 2011, Lisandro Dalcin wrote:
> On 10 May 2011 05:27, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> > I find it very useful when writing PETSc code to keep the environmental variable
> >
> > export PETSC_OPTIONS="-malloc -malloc_debug -malloc_dump"
> >
> > where I run my test programs. This helps me see memory leaks immediately (where I forgot to destroy some objects or free some memory) rather than tracking down a ton of memory leaks months later. Suggest others do the same.
> >
>
> Is this used when you "make testexamples" ?
I try to have these options in ~/.petscrc for most of the testmachines.
Satish
More information about the petsc-dev
mailing list