[petsc-users] -log_summary output

Barry Smith bsmith at mcs.anl.gov
Fri May 13 10:27:54 CDT 2011

On May 13, 2011, at 8:56 AM, ilyas ilyas wrote:

> Hello,
> Would you please help me to understand two attached -log_summary outputs. Both are from same cfd-petsc code, taken at different times at the end of first time-step.
> Domain : 256^3, periodic (defined in DA's)
> Ncores : 256
> After a couple of hundered iterations, one or more cores killed/dumped and my code exits.This is not an issue with a coarse resolution (say 32^3,64^3) May this be related to my code?

Object Type          Creations   Destructions     Memory  Descendants' Mem.
Reports information only for process 0.

--- Event Stage 0: Main Stage

   Distributed array     1              0            0     0
                 Vec   597            579    340156096     0
         Vec Scatter     3              1          868     0
           Index Set     9              9      1700440     0

I'm thinking there may be a memory leak with the vectors. During the run you sent us it is creating 597 vectors but only destroying 579. If each time-step you are leaking vectors it will eventually run out of memory and stop.  Check that all your Vec creations have a matching destroy. Also make sure that is true for matrices. You can run with the options -malloc -malloc_debug -malloc_dump as a test and it will print out all the memory that PETSc used that was not freed. Ideally this will always report nothing after a run. BTW: Don't use these options when running for performance, just use them to test for memory leaks.

> (Assuming enough memory available in the system). What is wrong with MatXXX ?

   Not sure what you mean here? There is no MatXXX in the output you sent us. It is true that since the matrices take up a lot of memory when memory is leaked often it crashes when trying to allocate a matrix.


> Thanks a lot,
> Ilyas.
> Energy Inst.
> <185432.out><185433.out>

More information about the petsc-users mailing list