[Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0 and git-master)
Andy Bauer
andy.bauer at kitware.com
Tue Jan 10 20:39:24 EST 2012
I did some more testing and determined that with my script that there
aren't any vtkObjects that aren't cleaned up after each call to the
coprocessing library with your surfaceRep.py script. Basicaly I kept a
counter in vtkObject that incremented for each constructor call and
decremented for each destructor call. At the end of every call I had the
same amount of vtkObjects.
After that I tried using valgrind to see if I could track it down any
further. While there was some memory leaks reported, the amount didn't
increase with the number of times the coprocessing pipeline was executed.
Curiously though, valgrind did list an increase in the amount of memory
that was leaked. It seemed like there were quite a few PyObjects that
weren't getting deleted properly though and maybe getting rid of them
properly would help. It may also be that memory fragmentation is a problem
since rather large arrays are probably being allocated to for the field
data as well as the opengl arrays (turning on immediate mode rendering
would help with that but I'm not sure how to do that through the python but
maybe someone else does).
Andy
On Tue, Jan 10, 2012 at 12:36 PM, Andy Bauer <andy.bauer at kitware.com> wrote:
> I ran the problem out for more time steps and am now seeing the same
> trend. Hopefully it won't take too much effort to track this down.
>
> Andy
>
>
> On Tue, Jan 10, 2012 at 12:09 PM, Andy Bauer <andy.bauer at kitware.com>wrote:
>
>> Hi,
>>
>> I'm trying to replicate it and with my scripts I'm getting the attached
>> memory usage. I'm not seeing it though I may not be measuring memory very
>> well or letting it play out long enough. I'll keep looking but it's
>> possible that you're not deleting your created data object that is getting
>> passed into the coprocessing library. That would be my first
>> recommendation to check. You may want to turn on debug leaks if you
>> haven't in your paraview build.
>>
>> By the way, I generated that graph with the attached scripts.
>>
>> Andy
>>
>>
>> 2012/1/10 Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
>>
>>> Hi John,
>>>
>>> What I observed on a Mac and a Linux box with 8 processor parallel
>>> runs (around 400MB per process) were quite similar to your memory
>>> profiling but with a bit larger growth rate of 1-2% and 2-3% per
>>> coprocessing execution respectively (somehow it was bigger on Linux).
>>> I'll see if I can do similar profiling.
>>>
>>> Takuya OSHIMA, Ph.D.
>>> Faculty of Engineering, Niigata University
>>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>>
>>> From: "Biddiscombe, John A." <biddisco at cscs.ch>
>>> Subject: RE: [Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0
>>> and git-master)
>>> Date: Tue, 10 Jan 2012 14:51:41 +0000
>>>
>>> > Takuya
>>> >
>>> > Running a test of coprocessing on a very small simulation using just 2
>>> cores
>>> > on the desktop, I am seeing what looks like a very small leak. Over
>>> about 30
>>> > iterations, it’s of the order of 30MB, so might not be real (need to
>>> test on a
>>> > bigger domain to see if it grows faster), but the trend looks
>>> credible. I’ll
>>> > see if I can pinpoint where the loss is occurring.
>>> >
>>> > JB
>>> >
>>> > [cid]
>>> >
>>> > -----Original Message-----
>>> > From: paraview-bounces at paraview.org [mailto:
>>> paraview-bounces at paraview.org] On
>>> > Behalf Of Takuya OSHIMA
>>> > Sent: 10 January 2012 15:11
>>> > To: paraview at paraview.org
>>> > Subject: Re: [Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0
>>> and
>>> > git-master)
>>> >
>>> > Attached in the previous mail is a sample Python coprocessing script
>>> that
>>> > exhibits the problem (written by the coprocessing script generator of
>>> > git-master as of today).
>>> >
>>> > Takuya
>>> >
>>> > Takuya OSHIMA, Ph.D.
>>> >
>>> > Faculty of Engineering, Niigata University
>>> >
>>> > 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>> >
>>> > From: Takuya OSHIMA <oshima at eng.niigata-u.ac.jp>
>>> >
>>> > Subject: Unreclaimed memory in coprocessing? (PV 3.12.0 and git-master)
>>> >
>>> > Date: Tue, 10 Jan 2012 23:08:21 +0900 (JST)
>>> >
>>> > > Hi,
>>> >
>>> > >
>>> >
>>> > > I am having a problem where the memory usage of my simulation program
>>> >
>>> > > which links with the PV coprocessing library grows until it gets
>>> >
>>> > > killed by the operating system.
>>> >
>>> > >
>>> >
>>> > > I have the following piece of code for triggering coprocessing and if
>>> >
>>> > > I watch the memory usage with the ps/top commands it grows only at
>>> the
>>> >
>>> > > timestep where this->Processor->CoProcess() is called. My simulation
>>> >
>>> > > program uses vtkImageData as underlying data structure so no data
>>> >
>>> > > format adaptation (that may involve allocating extra memory for data
>>> >
>>> > > copy) is performed.
>>> >
>>> > >
>>> >
>>> > > this->DataDescription->SetTimeData(this->TimeInfo->GetTimeValue(),
>>> >
>>> > > this->TimeInfo->GetTIter());
>>> >
>>> > > if (this->Processor->RequestDataDescription(this->DataDescription))
>>> >
>>> > > {
>>> >
>>> > > vtkCPInputDataDescription *idd
>>> >
>>> > > = this->DataDescription->GetInputDescriptionByName("input");
>>> >
>>> > > // obtain vtkImageData to coprocess from my simulation program
>>> >
>>> > > vtkImageData *grid = this->TimeInfo->GetGrid();
>>> >
>>> > > idd->SetWholeExtent(grid->GetWholeExtent());
>>> >
>>> > > idd->SetGrid(grid);
>>> >
>>> > > // now call the coprocessing library
>>> >
>>> > > this->Processor->CoProcess(this->DataDescription);
>>> >
>>> > > }
>>> >
>>> > >
>>> >
>>> > > Besides, the Apple's "leaks" tool shows no meaningful leaks which
>>> >
>>> > > makes me wonder if e.g. there are un-unregistered proxies than simply
>>> >
>>> > > unmatched New()/Delete() or new/delete pairs.
>>> >
>>> > >
>>> >
>>> > > The problem is same for PV 3.12.0 and the git master as of today.
>>> >
>>> > > Is anybody else having the problem? Any ideas?
>>> >
>>> > >
>>> >
>>> > > Thanks,
>>> >
>>> > > Takuya
>>> >
>>> > >
>>> >
>>> > > Takuya OSHIMA, Ph.D.
>>> >
>>> > > Faculty of Engineering, Niigata University
>>> >
>>> > > 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
>>> >
>>> > _______________________________________________
>>> >
>>> > Powered by www.kitware.com
>>> >
>>> > Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/
>>> > opensource.html
>>> >
>>> > Please keep messages on-topic and check the ParaView Wiki at: http://
>>> > paraview.org/Wiki/ParaView
>>> >
>>> > Follow this link to subscribe/unsubscribe:
>>> >
>>> > http://www.paraview.org/mailman/listinfo/paraview
>>> >
>>> > *
>>> >
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120110/853c33ee/attachment.htm>
More information about the ParaView
mailing list