<div dir="ltr"><div><div><div>Hello Nikos<br><br></div>I have memory leak issues when creating animations from an XDMF file from the Paraview GUI (version 3.14.1 32-bit). In my case, I was using a single file XDMF file pair (i.e., one XML file and one HDF5 file) rather than a series of XDMF files. <br>
<br>As a workaround, I use VTK to write a series of images and then make the animation from those myself. <br><br></div>I wonder if there is a memory leak in the Paraview 3.x XDMF reader? I think Kitware may have used a new version of the XDMF library in the recently released Paraview 4.0 ... if so, then you might try Paraview 4.0 to see if that fixes the issue.<br>
<br></div>Cheers<br>Jason<br><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 11:15 AM, Nikolaos Beratlis <span dir="ltr"><<a href="mailto:nikos.beratlis@gmail.com" target="_blank">nikos.beratlis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am using the following python script to extract images from a series of files for an animation:<div><br>
</div><div><div>try: paraview.simple</div><div>except: from paraview.simple import *</div><div>paraview.simple._DisableFirstRenderCameraReset()</div>
<div><br></div><div>index = [None]*9999</div><div><br></div><div>m = 0</div><div>for i in range(0, 9):</div><div> for j in range(0, 9):</div><div> for k in range(0, 9):</div><div> for l in range(0, 9):</div><div>
index[m] = chr(i+48)+chr(j+48)+chr(k+48)+chr(l+48)</div><div> m = m+1</div><div><br></div><div><br></div><div>for i in range(1,2):</div><div><br></div><div> cf_VP_anim_xmf = XDMFReader( FileName='XDMF/cf_VP'+index[i]+'.xmf' )</div>
<div><br></div><div> cf_VP_anim_xmf.CellArrays = []</div><div> cf_VP_anim_xmf.Sets = []</div><div> cf_VP_anim_xmf.PointArrays = ['Cf']</div><div><br></div><div> RenderView1 = GetRenderView()</div><div>
a1_Cf_PVLookupTable = GetLookupTableForArray( "Cf", 1 )</div><div><br></div><div> Cfcontours = Show()</div><div> Cfcontours.EdgeColor = [0.0, 0.0, 0.50000762951094835]</div><div> Cfcontours.SelectionPointFieldDataArrayName = 'Cf'</div>
<div> Cfcontours.ScalarOpacityFunction = []</div><div> Cfcontours.ColorArrayName = 'Cf'</div><div> Cfcontours.ScalarOpacityUnitDistance = 2.4071425938556859</div><div> Cfcontours.LookupTable = a1_Cf_PVLookupTable</div>
<div> Cfcontours.ScaleFactor = 15.0</div><div><br></div><div> cf_VP_anim_xmf.Grids = ['STL Grid']</div><div><br></div><div> RenderView1.CacheKey = 2.0</div><div> RenderView1.CameraClippingRange = [288.47079837284241, 299.16435388730815]</div>
<div> RenderView1.UseCache = 0</div><div><br></div><div> a1_Cf_PVLookupTable.RGBPoints = [-0.0080000000000000002, 0.0, 0.0, 1.0, 0.0080000000000000002, 1.0, 0.0, 0.0]</div><div> a1_Cf_PVLookupTable.LockScalarRange = 1</div>
<div><br></div><div> separationline = Contour( PointMergeMethod="Uniform Binning" )</div><div><br></div><div> separationline.ContourBy = ['POINTS', 'Cf']</div><div> separationline.Isosurfaces = [0.0]</div>
</div><div><div> DataSeparationLine = Show()</div><div> DataSeparationLine.ScaleFactor = 12.321390008926393</div><div> DataSeparationLine.SelectionPointFieldDataArrayName = 'Cf'</div><div> DataSeparationLine.EdgeColor = [0.0, 0.0, 0.50000762951094835]</div>
<div> DataSeparationLine.LineWidth = 2.0</div><div> DataSeparationLine.DiffuseColor = [0.0, 0.0, 0.0]</div><div><br></div><div> DataSeparationLine.ColorArrayName = ''</div><div><br></div><div> Cfcontours.Visibility = 1</div>
<div><br></div><div> Q_VP_xmf = XDMFReader( FileName='XDMF/Q_VP'+index[i]+'.xmf' )</div><div><br></div><div> Q_VP_xmf.CellArrays = []</div><div> Q_VP_xmf.Sets = []</div><div> Q_VP_xmf.PointArrays = ['Q']</div>
<div><br></div><div> DataQ = Show()</div><div> DataQ.Representation = 'Outline'</div><div> DataQ.ScaleFactor = 12.341455459594727</div><div> DataQ.SelectionPointFieldDataArrayName = 'Q'</div><div>
DataQ.EdgeColor = [0.0, 0.0, 0.50000762951094835]</div><div><br></div><div> Q_VP_xmf.Grids = ['Eulerian Grid']</div><div><br></div><div> ContourQ = Contour( PointMergeMethod="Uniform Binning" )</div>
<div> ContourQ.PointMergeMethod = "Uniform Binning"</div><div> ContourQ.ContourBy = ['POINTS', 'Q']</div><div> ContourQ.Isosurfaces = [1.0]</div><div> ContourQ.ComputeNormals = 0</div>
<div><br></div><div> DataQiso = Show()</div><div> DataQiso.ScaleFactor = 7.4976861000061037</div><div> DataQiso.SelectionPointFieldDataArrayName = 'Normals'</div><div> DataQiso.EdgeColor = [0.0, 0.0, 0.50000762951094835]</div>
<div><br></div><div> DataQ.Visibility = 0</div><div><br></div><div><br></div><div> #--- Setup view</div><div> RenderView1 = GetRenderView()</div><div> RenderView1.Background = [1.0, 1.0, 1.0]</div><div> RenderView1.CenterAxesVisibility = 0</div>
<div> RenderView1.OrientationAxesVisibility = 0</div><div> RenderView1.ViewSize = [2000, 350]</div><div><br></div><div> RenderView1.CameraViewUp = [0.0,-1.0, -2.2204460492503131e-16]</div><div> RenderView1.CameraPosition = [41.5, 0.0, 56.5]</div>
<div> RenderView1.CameraClippingRange = [120.40716073726786, 126.85668499830999]</div><div> RenderView1.InteractionMode = '3D'</div><div> RenderView1.CameraFocalPoint = [0, 0, 56.5]</div><div> RenderView1.CenterOfRotation = [0, 0, 56.5]</div>
</div><div><br></div><div><div> #--- Export image</div><div> Render()</div><div> WriteImage('Q_cf_topview_'+index[i]+'.jpg')</div><div><br></div><div><br></div><div> #--- Delete objects (order is important)</div>
<div> Delete(DataSeparationLine)</div><div> Delete(separationline)</div><div> Delete(Cfcontours)</div><div> Delete(cf_VP_anim_xmf)</div><div> Delete(DataQiso)</div><div> Delete(ContourQ)</div><div> Delete(DataQ)</div>
<div> Delete(Q_VP_xmf)</div></div><div><br></div><div><br></div><div>At the end of the for loop, I delete all the objects and readers. I run this python script in batch mode (Paraview 3.98) and in parallel with 4 processors. However I am having a memory leak, by the 6th time in the for loop it complains about insufficient memory. Can anyone understand what is causing the memory to increase? Do I forget to delete sth?</div>
<div><br></div><div>Thank you,</div><div><br></div><div>Nikos</div></div>
<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><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Dr. Jason G. Fleming<br>Chief Engineer, Seahorse Coastal Consulting<br>3103 Mandy Ln<br>Morehead City, NC 28557<br>Tel: (252) 726-6323<br>Mobile: (252) 269-0962<br>
Web: <a href="http://www.seahorsecoastal.com">http://www.seahorsecoastal.com</a><br></div>
</div>