<div dir="ltr"><div><div><div><div><div><div><div><div><div>Sir,<br><br></div>Thank you very much for answering so quickly. I went with the first option and tried the Delete() statements again, but still keep getting errors, be it different ones. Specifically I have put the following four statements right after Render() in my code:<br><br></div>Delete(VoltParaviewMovie)<br></div>Delete(AnimationScene1)<br></div>Delete(RenderView1)<br></div>Delete(DataRepresentation1)<br><br></div>After executing I get the following error:<br><br>Traceback (most recent call last):<br> File "./RunParaviewMovieMaker.py", line 99, in <module><br> main()<br> File "./RunParaviewMovieMaker.py", line 21, in main<br> create_movie(filename3)<br> File "./RunParaviewMovieMaker.py", line 91, in create_movie<br> Delete(DataRepresentation1)<br> File "/usr/lib/python2.7/dist-packages/paraview/simple.py", line 482, in Delete<br> servermanager.UnRegister(proxy)<br> File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 2764, in UnRegister<br> raise RuntimeError, "UnRegistration error."<br>RuntimeError: UnRegistration error.<br>*** Error in `/usr/bin/python': corrupted double-linked list: 0x0000000004633310 ***<br>Aborted (core dumped)<br><br>Upon removing the last line, and just working with 3 Delete() statements, I also get an error, namely:<br><br>Traceback (most recent call last):<br> File "./RunParaviewMovieMaker.py", line 98, in <module><br> main()<br> File "./RunParaviewMovieMaker.py", line 21, in main<br> create_movie(filename3)<br> File "./RunParaviewMovieMaker.py", line 44, in create_movie<br> AnimationScene1 = GetAnimationScene()<br> File "/usr/lib/python2.7/dist-packages/paraview/simple.py", line 794, in GetAnimationScene<br> raise servermanager.MissingProxy, "Could not locate global AnimationScene."<br>paraview.servermanager.MissingProxy: Could not locate global AnimationScene.<br>*** Error in `/usr/bin/python': double free or corruption (!prev): 0x0000000002908e30 ***<br>Aborted (core dumped)<br><br></div>Do you have any idea on how to resolve these errors? I do especially not understand what the 'proxy' is doing in my errors.<br>If not, I might opt for the second option with ImageMagick (although I would still prefer to resolve my current issues).<br><br></div>With kind regards,<br></div>Tim<br><div class="gmail_extra"><br><div class="gmail_quote">2016-01-19 18:28 GMT+01:00 Tim Gallagher <span dir="ltr"><<a href="mailto:tim.gallagher@gatech.edu" target="_blank">tim.gallagher@gatech.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000">Your delete line is <br><br> Delete(Animationscene1)<br><br>but your variable is actually called AnimationScene1 (camel-case lettering). Python is case-sensitive, so that's why you are getting the error you are showing.<br><br>That said, we do two things to loop over everything. We can Delete() every object, but that can be tedious in complicated pipelines. Alternatively, we have a driver script that executes pvpython on a trace script and passes in a number to indicate which file should be rendered. Our trace script then dumps a single PNG image and we stitch them together to make a movie afterwards using ImageMagick. Since each image is rendered in an entirely new instance of pvpython, there are no memory issues. An example driver script is below. We've also made our driver script parallel so it splits the range of data files into chunks for each processor, and then pvpython is called multiple times in parallel to render the files.<br><br>Tim<br><br> import subprocess<br><br> start = 0<br> end = 100<br> stride = 1<br><br> for n in range(start, end + 1, stride):<br> print "Working on file: ", n<br> subprocess.call(['/data4/pv4.1Install-OS/bin/pvpython', 'jicf_trace.py', '%i' % (n)])<br><br><hr><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>From: </b>"Tim De Coster" <<a href="mailto:tim91decoster@gmail.com" target="_blank">tim91decoster@gmail.com</a>><br><b>To: </b><a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br><b>Sent: </b>Tuesday, January 19, 2016 10:03:01 AM<br><b>Subject: </b>[Paraview] Memory overload and I don't know what to delete (despite looking in the archives)<div><div class="h5"><br><br><div dir="ltr"><div><div><div><div><div>Hi all,<br><br></div>I am stuck with a problem
regarding ParaView (version 4.0.1 64-bit), running on Ubuntu 14.04. It seems that when I run a
python script, my memory gets overloaded. I looked already in the
archives and it seems that I need to delete some data using the command Delete(). When I try this
however, I get error messages saying that the things I want to delete
are not possible<br>( File "./RunParaviewMovieMaker.py", line 89, in create_movie<br> Delete(Animationscene1)<br>NameError: global name 'Animationscene1' is not defined<br>*** Error in `/usr/bin/python': corrupted double-linked list: 0x0000000002b52ca0 ***<br>).<br>Let me first explain my problem in more detail:<br><br></div>I
have a lot of data that I generated with another script (about 3TB and
still increasing), but now I need to convert these data into movies.
When I run my loop over different folders, the first few movies are
generated in less than 30s each, but then gradually the time per movie
starts increasing and my memory gets overloaded. The script I am running
is (which I simply got from using the trace call for python in ParaView):<br><br>#!/usr/bin/python<br><br>from paraview.simple import *<br><br>def main():<br><br> some huge for-loop generating names of maps where the .vtk files are stored. In this for loop I use the command:<br> create_movie(filename3)<br><br>def create_movie(mapname):<br><br> vtkfolder = '.'<br> number_of_frames = 2000<br><br> vtknames = []<br> for i in range (0, number_of_frames - 1):<br> vtknames.append('{1}/{2}/VoltParaviewMovie{0:0=4d}.vtk'.format(i, vtkfolder, mapname))<br><br> VoltParaviewMovie = LegacyVTKReader(FileNames = vtknames)<br><br> AnimationScene1 = GetAnimationScene()<br> AnimationScene1 = GetAnimationScene()<br> AnimationScene1.EndTime = 1999.0<br> AnimationScene1.PlayMode = 'Snap To TimeSteps'<br><br> AnimationScene1.EndTime = 1999.0<br> AnimationScene1.PlayMode = 'Snap To TimeSteps'<br><br> RenderView1 = GetRenderView()<br>
a1_Voltage_PVLookupTable = GetLookupTableForArray( "Voltage", 1,
RGBPoints=[-85.52999877929688, 0.23, 0.299, 0.754, 50.0, 0.706, 0.016,
0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0],
ColorSpace='Diverging', ScalarRangeInitialized=1.0,
AllowDuplicateScalars=1 )<br><br> a1_Voltage_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )<br><br> DataRepresentation1 = Show()<br> DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]<br> DataRepresentation1.SelectionPointFieldDataArrayName = 'Voltage'<br> DataRepresentation1.ScalarOpacityFunction = a1_Voltage_PiecewiseFunction<br> DataRepresentation1.ColorArrayName = ('POINT_DATA', 'Voltage')<br> DataRepresentation1.ScalarOpacityUnitDistance = 7.108580809929175<br> DataRepresentation1.LookupTable = a1_Voltage_PVLookupTable<br> DataRepresentation1.Representation = 'Slice'<br> DataRepresentation1.ScaleFactor = 0.0<br><br> RenderView1.CameraFocalPoint = [63.5, 63.5, 0.0]<br> RenderView1.CameraPosition = [63.5, 63.5, 10000.0]<br> RenderView1.InteractionMode = '2D'<br> RenderView1.CenterOfRotation = [63.5, 63.5, 0.0]<br><br> a1_Voltage_PVLookupTable.ScalarOpacityFunction = a1_Voltage_PiecewiseFunction<br><br> RenderView1.CameraPosition = [63.5, 63.5, 346.97045256124744]<br> RenderView1.CameraClippingRange = [343.50074803563496, 352.1750093496662]<br> RenderView1.CameraParallelScale = 89.80256121069154<br><br> newmapname = ''<br> fragments = mapname.split('.')<br> for fragment in fragments:<br> newmapname +=fragment<br><br> WriteAnimation('{0}/{1}.avi'.format(vtkfolder, newmapname), Magnification=1, Quality=2, FrameRate=15.000000)<br><br> Render()<br><br> print('{0} has been produced.'.format(newmapname))<br><br><br>if __name__ == '__main__':<br> main()<br><br></div>Would
any one of you be able to point out to me what I am doing wrong? Or
which objects/structures I should delete (in the archives the problem always appeared to be that a writer needed to be deleted, but I don't have such an object) such that I basically start
over each time I create a new movie and hence don't use that much memory?<br><br></div>With kind regards,<br></div>Tim</div>
<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 <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>Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br></div><br></div></div></blockquote></div><br></div></div>