memory bleeding

Barry Smith bsmith at mcs.anl.gov
Fri May 5 07:53:20 CDT 2006


    See http://www-unix.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html
number 12

    You can run for say a few iterations with the options
-malloc_debug -malloc_dump (in  PETSc 2.3.1. in early releases it had
different names). At PetscFinalize() PETSc will print all the memory
it has allocated that has not been freed and where it was allocated.
This can help determine what objects are not being freed.

    Barry

>
> Hi,
>
> I use PETSc, and after 5000 (more or less) iteations in which i solve a little
> matrix
> (30x30) my swap is totally used!!! I'm sure that when I create my matrices I
> destroy
> them. Could you help me about it? What happens? What thing I do bad?
>
> Mat K
> MatCreateSeqAIJ(PETSC_COMM_SELF, dim, dim, 9 , PETSC_NULL, &K);
> MatSetFromOptions(K);
> MatSetOption(K, MAT_SYMMETRIC);
> MatSetOption(K, MAT_ROW_ORIENTED);
> MatSetOption(K, MAT_IGNORE_ZERO_ENTRIES);
> MatSetOption(K, MAT_NEW_NONZERO_ALLOCATION_ERR);
>
> ( I use KSP solve, created and destroyed)
>
> MatDestroy(K);
>
>
> Thanks,
> jordi
> -----------
> Jordi Marcé-Nogué
> Dept. Resistència de Materials i Estructures a l'Enginyeria
> Universitat Politècnica de Catalunya (UPC)
>
> Edifici T45 - despatx 137
> ETSEIAT (Terrassa)
>
> phone: +34 937 398 728
> mail: jordi.marce at upc.edu
>
>
>


More information about the petsc-users mailing list