<div dir="ltr">I think your memory usage is growing with each iteration, Try moving everything out of the loop and then just changing what you have to in the fixed pipeline inside the loop.<br><br><br>i = 415<br>RenderView1 = GetRenderView()<br>…<br>Render()<br>WriteImage("Endo_dir_%06i.png" % (i))<br>for i in range(416…):<br> HumanSAN000001_vtk.FileName='HumanSAN%06i.vtk' % (i)<br> a1_voltage_PVLookupTable = GetLookupTableForArray( "voltage", 1, NanColor=[0.25, 0.0, 0.0], RGBPoints=[0.0, 0.23, 0.299, 0.754, 1.0, 0.7059976962405788, 0.016126465515202103, 0.15000112339188484], VectorMode='Magnitude', ColorSpace='Diverging', LockScalarRange=1 )<br> Render()<br> WriteImage…<div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909</div></div>
<br><div class="gmail_quote">On Sat, Jul 25, 2015 at 11:30 AM, Kharche, Sanjay <span dir="ltr"><<a href="mailto:S.R.Kharche@exeter.ac.uk" target="_blank">S.R.Kharche@exeter.ac.uk</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">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<br>
Dear David, All<br>
<br>
I am now using VNC and got my scripts to do non-interactive viz, i.e.<br>
making of png files using the script below. However, I have a question<br>
regarding efficiency of the run.<br>
<br>
As of now, I am doing a serial run. The first several png files are produced<br>
swiftly. However, eventually, the run slows down considerably.<br>
e.g. files 1 to 200 are at a rate of 10 per second <br>
but files 300 to 35 are almost 1 every 2 minutes.#<br>
<br>
Any ideas why this is, and how to rectify this? Isthis a memory leak and if so<br>
how not do introduce this when making the .py script using the trace option<br>
in the GUI?<br>
<br>
cheers<br>
Sanjay<br>
<br>
<br>
line in pbs script:<br>
<br>
# now any X11 traffic is sent to the VNC server.<br>
pvbatch --use-offscreen-rendering sk3d.py &<br>
<br>
<br>
my sk3d.py script:<span class=""><br>
<br>
try: paraview.simple<br>
except: from paraview.simple import *<br>
paraview.simple._DisableFirstRenderCameraReset()<br>
<br></span>
for i in range (415,3998):<br>
RenderView1 = GetRenderView()<br>
HumanSAN000001_vtk = LegacyVTKReader( FileNames=['HumanSAN%06i.vtk' % (i)] )<br>
RenderView1.CenterAxesVisibility = 0<br>
RenderView1.OrientationAxesVisibility = 0<br>
RenderView1.Background2 = [0.0, 0.0, 0.16470588235294117]<br>
RenderView1.Background = [1.0, 1.0, 1.0]<br>
DataRepresentation1 = Show()<br>
DataRepresentation1.ScalarOpacityUnitDistance = 2.184824466829962<br>
DataRepresentation1.Representation = 'Outline'<span class=""><br>
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]<br></span>
RenderView1.CenterOfRotation = [63.5, 63.5, 59.0]<br>
a1_voltage_PVLookupTable = GetLookupTableForArray( "voltage", 1, NanColor=[0.25, 0.0, 0.0], RGBPoints=[0.0, 0.23, 0.299, 0.754, 1.0, 0.7059976962405788, 0.016126465515202103, 0.15000112339188484], VectorMode='Magnitude', ColorSpace='Diverging', LockScalarRange=1
)<br>
a1_voltage_PiecewiseFunction = CreatePiecewiseFunction()<br>
RenderView1.CameraPosition = [63.5, -351.65487519135064, 59.0]<br>
RenderView1.CameraViewUp = [0.0, 0.0, 1.0]<br>
RenderView1.CameraFocalPoint = [63.5, 63.5, 59.0]<br>
RenderView1.CameraClippingRange = [284.63832643943715, 580.4496983192209]<br>
RenderView1.CameraParallelScale = 107.44998836668155<br>
DataRepresentation1.Representation = 'Volume'<br>
DataRepresentation1.ScalarOpacityFunction = a1_voltage_PiecewiseFunction<br>
DataRepresentation1.ColorArrayName = 'voltage'<br>
DataRepresentation1.LookupTable = a1_voltage_PVLookupTable<br>
Render()<br>
WriteImage("Endo_dir_%06i.png" % (i))<br>
</div>
</div>
</blockquote></div><br></div>