<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>