<div dir="ltr">Hi Bill,<div><br></div><div>I added a very small sample data set. I am not sure if the memory problem I am encountering with my big data-set is measurable for this one.</div><div><br></div><div>Anyhow, I would like to repeat that I am using Python 2.6 and VTK 5.10,</div>
<div><br></div><div>Best regards,</div><div>Bernhard</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 March 2014 19:25, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The ensight readers could use more testing. Can you provide a "small"<br>
dataset and program that cause memory leaks?<br>
<br>
Bill<br>
<br>
<br>
On Mon, Mar 3, 2014 at 10:38 AM, Bernhard Righolt<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:b.w.righolt@tudelft.nl">b.w.righolt@tudelft.nl</a>> wrote:<br>
> Dear all,<br>
><br>
> A typical case file, looks as follows (ASCII).<br>
><br>
> $ head -n 20 case.case<br>
> FORMAT<br>
> type: ensight gold<br>
><br>
> GEOMETRY<br>
> model: 1 sliceCentre.000.mesh<br>
><br>
> VARIABLE<br>
> vector per node: 1 U sliceCentre.*****.U<br>
><br>
> TIME<br>
> time set: 1<br>
> number of steps: 11550<br>
> filename start number: 1<br>
> filename increment: 1<br>
> time values:<br>
> 0.002<br>
> 0.004<br>
> 0.006<br>
> 0.008<br>
> 0.01<br>
> $<br>
><br>
> The mesh (snippet only), is as follows:<br>
><br>
> $ head -n 10 sliceCentre.000.mesh<br>
> Ensight Geometry File<br>
> =====================<br>
> node id assign<br>
> element id assign<br>
> part<br>
> 1<br>
> sliceCentre.000.mesh<br>
> coordinates<br>
> 299028<br>
> 0.00000e+00<br>
> $ sed -n -e 897091,897098p sliceCentre.000.mesh<br>
> 0.00000e+00<br>
> 0.00000e+00<br>
> 0.00000e+00<br>
> tria3<br>
> 595264<br>
> 162106 162714 162799<br>
> 162799 162226 162106<br>
> 162714 162106 162021<br>
><br>
><br>
> And the corresponding datafile<br>
> $ head -n 10 sliceCentre.00001.U<br>
> vector<br>
> part<br>
> 1<br>
> coordinates<br>
> 5.33425e-04<br>
> 2.69515e-03<br>
> -1.65164e-03<br>
> 5.33425e-04<br>
> 1.39069e-04<br>
> 2.69515e-03<br>
><br>
><br>
> However, I doubt if something is wrong with my datafiles itself, because I<br>
> can easily read them in Paraview for example, the only difference is the<br>
> large amount of data-files, e.g (124GB in this case)<br>
><br>
> Best regards,<br>
> Bernhard<br>
><br>
><br>
> On 27 February 2014 22:28, Berk Geveci <<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>> wrote:<br>
>><br>
>> Nothing strikes me as obviously wrong in your script. Can you send me<br>
>> your case file? I'll take a look.<br>
>><br>
>> -berk<br>
>><br>
>> On Thu, Feb 27, 2014 at 3:20 AM, Bernhard Righolt<br>
>> <<a href="mailto:b.w.righolt@tudelft.nl">b.w.righolt@tudelft.nl</a>> wrote:<br>
>> > Dear all,<br>
>> ><br>
>> > Currently I am using a Python script to process information stored in<br>
>> > the<br>
>> > EnSight Gold format. My Python (2.6) scipt uses VTK (5.10.0) to process<br>
>> > the<br>
>> > file, where I used the vtkEnSightGoldReader for reading the data, and<br>
>> > loop<br>
>> > over time steps.<br>
>> ><br>
>> > In principle this works fine for smaller datasets, however, for large<br>
>> > datasets (i.e. 11k files of 12MB), I see the memory usage (recorded via<br>
>> > top)<br>
>> > increasing with time while the process is running. This filling of the<br>
>> > memory goes slow, but in some cases problems are inevitable. Apparently,<br>
>> > I<br>
>> > am doing some things wrong in my script with respect to memory<br>
>> > management.<br>
>> ><br>
>> > I am using the following script (stripped obviously, but still showing<br>
>> > this<br>
>> > issue)<br>
>> ><br>
>> > import vtk<br>
>> ><br>
>> > reader = vtk.vtkEnSightGoldReader()<br>
>> ><br>
>> > reader.SetCaseFileName("case.case")<br>
>> > reader.Update()<br>
>> ><br>
>> > # Get time values<br>
>> > timeset=reader.GetTimeSets()<br>
>> > time=timeset.GetItem(0)<br>
>> > timesteps=time.GetSize()<br>
>> ><br>
>> > #reader.ReleaseDataFlagOn()<br>
>> ><br>
>> > for j in range(timesteps):<br>
>> > curTime=time.GetTuple(j)[0]<br>
>> > print curTime<br>
>> > reader.SetTimeValue(curTime)<br>
>> > reader.Update()<br>
>> ><br>
>> > #reader.RemoveAllInputs()<br>
>> ><br>
>> ><br>
>> > I tried a few things as you can see<br>
>> > - reader.ReleaseDataFlagOn(), without success<br>
>> > - reader.RemoveAllInputs(), did not get it to run<br>
>> > - running gc.collect at the end of the loop, following<br>
>> > <a href="http://vtk.1045678.n5.nabble.com/VTK-memory-management-td5715661.html" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-memory-management-td5715661.html</a><br>
>> > - Using DeepCopy as suggested here:<br>
>> ><br>
>> > <a href="http://vtk.1045678.n5.nabble.com/Memory-leak-in-VTK-Python-module-td1234002.html" target="_blank">http://vtk.1045678.n5.nabble.com/Memory-leak-in-VTK-Python-module-td1234002.html</a><br>
>> > However, I am already experiencing this without a call to GetOutput<br>
>> ><br>
>> ><br>
>> > My question is, how can I properly unload/replace the data that is<br>
>> > stored in<br>
>> > the memory, instead of using more memory continuously?<br>
>> ><br>
>> > Best regards,<br>
>> > Bernhard<br>
>> ><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<br>
>> > <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 VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
><br>
><br>
><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<br>
> <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 VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br></div>