<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>I just did that, and the 4000 file run finished in 15 minutes!</p>
<p><br>
</p>
<p>Just for completeness, I would like to know this: What was the part in my</p>
<p>script that was allocating memory at each call of the iteration, causing</p>
<p>a progressive increase of memory use (and thus time)?</p>
<p><br>
</p>
<p>I could take a guess, but that would just be a guess, so any responses</p>
<p>are appreciated.<br>
</p>
<p><br>
</p>
<p>cheers</p>
<p>Sanjay<br>
</p>
<p><br>
</p>
<p><br>
</p>
<br>
<br>
<div style="color: rgb(26, 26, 26);">
<hr tabindex="-1" style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size: 11pt;" color="#000000" face="Calibri, sans-serif"><b>From:</b> David E DeMarle <dave.demarle@kitware.com><br>
<b>Sent:</b> 25 July 2015 03:47<br>
<b>To:</b> Kharche, Sanjay<br>
<b>Cc:</b> paraview@paraview.org<br>
<b>Subject:</b> Re: [Paraview] non-interactive viz on cluster</font>
<div> </div>
</div>
<div>
<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: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">
<div style="font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); 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>
</div>
</div>
</div>
</body>
</html>