<div dir="ltr"><div><div>Dear all,<br><br></div>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></div>The mesh (snippet only), is as follows:<br><br><div>$ 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></div><div>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></div><div>However, I doubt if something is wrong with my datafiles itself, because I can easily read them in Paraview for example, the only difference is the large amount of data-files, e.g (124GB in this case)<br>

<br></div><div>Best regards,<br>Bernhard<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 27 February 2014 22:28, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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>
<div><div class="h5"><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 the<br>
> EnSight Gold format. My Python (2.6) scipt uses VTK (5.10.0) to process the<br>
> file, where I used the vtkEnSightGoldReader for reading the data, and 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 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, I<br>
> am doing some things wrong in my script with respect to memory management.<br>
><br>
> I am using the following script (stripped obviously, but still showing 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>
> <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 stored in<br>
> the memory, instead of using more memory continuously?<br>
><br>
> Best regards,<br>
> Bernhard<br>
><br>
</div></div>> _______________________________________________<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>
</blockquote></div><br></div>