<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-GB;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US">&nbsp;&nbsp;&nbsp; obj = servermanager.misc.GlobalMapperProperties()</span></b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US">&nbsp;&nbsp;&nbsp; obj.GlobalImmediateModeRendering = 1</span></b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I added this at the start of
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US">def DoCoProcessing(datadescription):</span></b><span style="font-family:&quot;Courier New&quot;;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">but it does not seem to have made any difference.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">JB<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Andy Bauer [mailto:andy.bauer@kitware.com]
<br>
<b>Sent:</b> 11 January 2012 02:39<br>
<b>To:</b> Takuya OSHIMA<br>
<b>Cc:</b> Biddiscombe, John A.; paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0 and git-master)<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.&nbsp; Basicaly I kept
 a counter in vtkObject that incremented for each constructor call and decremented for each destructor call.&nbsp; At the end of every call I had the same amount of vtkObjects.&nbsp;
<br>
<br>
After that I tried using valgrind to see if I could track it down any further.&nbsp; While there was some memory leaks reported, the amount didn't increase with the number of times the coprocessing pipeline was executed.&nbsp; Curiously though, valgrind did list an increase
 in the amount of memory that was leaked.&nbsp; 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.&nbsp; 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).&nbsp;
<br>
<br>
Andy<o:p></o:p></p>
<div>
<p class="MsoNormal">On Tue, Jan 10, 2012 at 12:36 PM, Andy Bauer &lt;<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">I ran the problem out for more time steps and am now seeing the same trend.&nbsp; Hopefully it won't take too much effort to track this down.<br>
<span style="color:#888888"><br>
Andy</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">On Tue, Jan 10, 2012 at 12:09 PM, Andy Bauer &lt;<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi,<br>
<br>
I'm trying to replicate it and with my scripts I'm getting the attached memory usage.&nbsp; I'm not seeing it though I may not be measuring memory very well or letting it play out long enough.&nbsp; 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.&nbsp; That would be my first recommendation to check.&nbsp; You may want to turn on debug leaks if you haven't in your paraview build.<br>
<br>
By the way, I generated that graph with the attached scripts.<br>
<span style="color:#888888"><br>
Andy</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">2012/1/10 Takuya OSHIMA &lt;<a href="mailto:oshima@eng.niigata-u.ac.jp" target="_blank">oshima@eng.niigata-u.ac.jp</a>&gt;<o:p></o:p></p>
<p class="MsoNormal">Hi John,<br>
<br>
What I observed on a Mac and a Linux box with 8 processor parallel<br>
runs (around 400MB per process) were quite similar to your memory<br>
profiling but with a bit larger growth rate of 1-2% and 2-3% per<br>
coprocessing execution respectively (somehow it was bigger on Linux).<br>
I'll see if I can do similar profiling.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Takuya OSHIMA, Ph.D.<br>
Faculty of Engineering, Niigata University<br>
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<o:p></o:p></p>
</div>
<p class="MsoNormal">From: &quot;Biddiscombe, John A.&quot; &lt;<a href="mailto:biddisco@cscs.ch" target="_blank">biddisco@cscs.ch</a>&gt;<br>
Subject: RE: [Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0 and git-master)<br>
Date: Tue, 10 Jan 2012 14:51:41 &#43;0000<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
&gt; Takuya<br>
&gt;<br>
&gt; Running a test of coprocessing on a very small simulation using just 2 cores<br>
&gt; on the desktop, I am seeing what looks like a very small leak. Over about 30<br>
&gt; iterations, it&#8217;s of the order of 30MB, so might not be real (need to test on a<br>
&gt; bigger domain to see if it grows faster), but the trend looks credible. I&#8217;ll<br>
&gt; see if I can pinpoint where the loss is occurring.<br>
&gt;<br>
&gt; JB<br>
&gt;<o:p></o:p></p>
</div>
<p class="MsoNormal">&gt; [cid]<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a> [mailto:<a href="mailto:paraview-bounces@paraview.org" target="_blank">paraview-bounces@paraview.org</a>] On<br>
&gt; Behalf Of Takuya OSHIMA<br>
&gt; Sent: 10 January 2012 15:11<br>
&gt; To: <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
&gt; Subject: Re: [Paraview] Unreclaimed memory in coprocessing? (PV 3.12.0 and<br>
&gt; git-master)<br>
&gt;<br>
&gt; Attached in the previous mail is a sample Python coprocessing script that<br>
&gt; exhibits the problem (written by the coprocessing script generator of<br>
&gt; git-master as of today).<br>
&gt;<br>
&gt; Takuya<br>
&gt;<br>
&gt; Takuya OSHIMA, Ph.D.<br>
&gt;<br>
&gt; Faculty of Engineering, Niigata University<br>
&gt;<br>
&gt; 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br>
&gt;<br>
&gt; From: Takuya OSHIMA &lt;<a href="mailto:oshima@eng.niigata-u.ac.jp" target="_blank">oshima@eng.niigata-u.ac.jp</a>&gt;<br>
&gt;<br>
&gt; Subject: Unreclaimed memory in coprocessing? (PV 3.12.0 and git-master)<br>
&gt;<br>
&gt; Date: Tue, 10 Jan 2012 23:08:21 &#43;0900 (JST)<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; I am having a problem where the memory usage of my simulation program<br>
&gt;<br>
&gt; &gt; which links with the PV coprocessing library grows until it gets<br>
&gt;<br>
&gt; &gt; killed by the operating system.<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; I have the following piece of code for triggering coprocessing and if<br>
&gt;<br>
&gt; &gt; I watch the memory usage with the ps/top commands it grows only at the<br>
&gt;<br>
&gt; &gt; timestep where this-&gt;Processor-&gt;CoProcess() is called. My simulation<br>
&gt;<br>
&gt; &gt; program uses vtkImageData as underlying data structure so no data<br>
&gt;<br>
&gt; &gt; format adaptation (that may involve allocating extra memory for data<br>
&gt;<br>
&gt; &gt; copy) is performed.<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; &nbsp; this-&gt;DataDescription-&gt;SetTimeData(this-&gt;TimeInfo-&gt;GetTimeValue(),<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; this-&gt;TimeInfo-&gt;GetTIter());<br>
&gt;<br>
&gt; &gt; &nbsp; if (this-&gt;Processor-&gt;RequestDataDescription(this-&gt;DataDescription))<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; {<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; vtkCPInputDataDescription *idd<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; = this-&gt;DataDescription-&gt;GetInputDescriptionByName(&quot;input&quot;);<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; // obtain vtkImageData to coprocess from my simulation program<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; vtkImageData *grid = this-&gt;TimeInfo-&gt;GetGrid();<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; idd-&gt;SetWholeExtent(grid-&gt;GetWholeExtent());<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; idd-&gt;SetGrid(grid);<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; // now call the coprocessing library<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; this-&gt;Processor-&gt;CoProcess(this-&gt;DataDescription);<br>
&gt;<br>
&gt; &gt; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; Besides, the Apple's &quot;leaks&quot; tool shows no meaningful leaks which<br>
&gt;<br>
&gt; &gt; makes me wonder if e.g. there are un-unregistered proxies than simply<br>
&gt;<br>
&gt; &gt; unmatched New()/Delete() or new/delete pairs.<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; The problem is same for PV 3.12.0 and the git master as of today.<br>
&gt;<br>
&gt; &gt; Is anybody else having the problem? Any ideas?<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; Thanks,<br>
&gt;<br>
&gt; &gt; Takuya<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; &gt; Takuya OSHIMA, Ph.D.<br>
&gt;<br>
&gt; &gt; Faculty of Engineering, Niigata University<br>
&gt;<br>
&gt; &gt; 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt;<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/" target="_blank">
http://www.kitware.com/opensource/</a><br>
&gt; opensource.html<br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at: <a href="http://">
http://</a><br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
&gt; *<br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>