On May 14, 2011, at 6:48 AM, ilyas ilyas wrote: > Thank you Barry, > I will check my code for memory leak. > > Sorry for the question. I was not clear enough. > I was trying to point out Time Ratios for MatView(in the first output) and > MatView,MatGetRowIJ (in the second output).
MatView() will always have a large time ratio. I cannot explain why MatGetRowIJ() has such a huge ratio, in general this routine takes so little of the compute time it doesn't matter. Barry > Why are these values huge compared to others? > > Regards, > Ilyas > > > 2011/5/13 Barry Smith <bsmith at mcs.anl.gov> > > 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. > > Barry > > > > > Thanks a lot, > > > > Ilyas. > > Energy Inst. > > ITU > > <185432.out><185433.out> > >
