[Paraview] non-interactive viz on cluster

Kharche, Sanjay S.R.Kharche at exeter.ac.uk
Sat Jul 25 16:18:34 EDT 2015


I think I started celebrations too soon. The images are identical to the

first image. I have tried a few combinations, but could not find any solution.


The script:


try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

i = 1
RenderView1 = GetRenderView()
HumanSAN000001_vtk = LegacyVTKReader( FileNames=['HumanSAN%06i.vtk' % (i)] )
RenderView1.CenterAxesVisibility = 0
RenderView1.OrientationAxesVisibility = 0
RenderView1.Background2 = [0.0, 0.0, 0.16470588235294117]
RenderView1.Background = [1.0, 1.0, 1.0]
DataRepresentation1 = Show()
DataRepresentation1.ScalarOpacityUnitDistance = 2.184824466829962
DataRepresentation1.Representation = 'Outline'
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
RenderView1.CenterOfRotation = [63.5, 63.5, 59.0]
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 )
a1_voltage_PiecewiseFunction = CreatePiecewiseFunction()
RenderView1.CameraPosition = [63.5, -351.65487519135064, 59.0]
RenderView1.CameraViewUp = [0.0, 0.0, 1.0]
RenderView1.CameraFocalPoint = [63.5, 63.5, 59.0]
RenderView1.CameraClippingRange = [284.63832643943715, 580.4496983192209]
RenderView1.CameraParallelScale = 107.44998836668155
DataRepresentation1.Representation = 'Volume'
DataRepresentation1.ScalarOpacityFunction = a1_voltage_PiecewiseFunction
DataRepresentation1.ColorArrayName = 'voltage'
DataRepresentation1.LookupTable = a1_voltage_PVLookupTable
Render()
WriteImage("Endo_dir_%06i.png" % (i))
for j in range (2,3998):
    HumanSAN000001_vtk = LegacyVTKReader( FileNames=['HumanSAN%06i.vtk' % (j)] )
    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 )
    Render()
    WriteImage("Endo_dir_%06i.png" % (j))



________________________________
From: David E DeMarle <dave.demarle at kitware.com>
Sent: 25 July 2015 03:47
To: Kharche, Sanjay
Cc: paraview at paraview.org
Subject: Re: [Paraview] non-interactive viz on cluster

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.


i = 415
RenderView1 = GetRenderView()
…
Render()
WriteImage("Endo_dir_%06i.png" % (i))
for i in range(416…):
   HumanSAN000001_vtk.FileName='HumanSAN%06i.vtk' % (i)
   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 )
   Render()
   WriteImage…


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Sat, Jul 25, 2015 at 11:30 AM, Kharche, Sanjay <S.R.Kharche at exeter.ac.uk<mailto:S.R.Kharche at exeter.ac.uk>> wrote:

Dear David, All

I am now using VNC and got my scripts to do non-interactive viz, i.e.
making of png files using the script below. However, I have a question
regarding efficiency of the run.

As of now, I am doing a serial run. The first several png files are produced
swiftly. However, eventually, the run slows down considerably.
e.g. files 1 to 200 are at a rate of 10 per second
but files 300 to 35 are almost 1 every 2 minutes.#

Any ideas why this is, and how to rectify this? Isthis a memory leak and if so
how not do introduce this when making the .py script using the trace option
in the GUI?

cheers
Sanjay


line in pbs script:

# now any X11 traffic is sent to the VNC server.
pvbatch --use-offscreen-rendering sk3d.py &


my sk3d.py script:

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

for i in range (415,3998):
    RenderView1 = GetRenderView()
    HumanSAN000001_vtk = LegacyVTKReader( FileNames=['HumanSAN%06i.vtk' % (i)] )
    RenderView1.CenterAxesVisibility = 0
    RenderView1.OrientationAxesVisibility = 0
    RenderView1.Background2 = [0.0, 0.0, 0.16470588235294117]
    RenderView1.Background = [1.0, 1.0, 1.0]
    DataRepresentation1 = Show()
    DataRepresentation1.ScalarOpacityUnitDistance = 2.184824466829962
    DataRepresentation1.Representation = 'Outline'
    DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
    RenderView1.CenterOfRotation = [63.5, 63.5, 59.0]
    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 )
    a1_voltage_PiecewiseFunction = CreatePiecewiseFunction()
    RenderView1.CameraPosition = [63.5, -351.65487519135064, 59.0]
    RenderView1.CameraViewUp = [0.0, 0.0, 1.0]
    RenderView1.CameraFocalPoint = [63.5, 63.5, 59.0]
    RenderView1.CameraClippingRange = [284.63832643943715, 580.4496983192209]
    RenderView1.CameraParallelScale = 107.44998836668155
    DataRepresentation1.Representation = 'Volume'
    DataRepresentation1.ScalarOpacityFunction = a1_voltage_PiecewiseFunction
    DataRepresentation1.ColorArrayName = 'voltage'
    DataRepresentation1.LookupTable = a1_voltage_PVLookupTable
    Render()
    WriteImage("Endo_dir_%06i.png" % (i))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150725/13dc04e7/attachment.html>


More information about the ParaView mailing list