[Paraview] non-interactive viz on cluster
Kharche, Sanjay
S.R.Kharche at exeter.ac.uk
Sat Jul 18 15:26:49 EDT 2015
Hi
It looks like that my question is more for pbs/torque rather than paraview.
But I will still ask.
I am not wanting to do the visualisation using the PBS -X option, which
will forward the X11 graphics from the compute mnodes to my desktop screen.
I want to do it completely non-interactively. I could not find any other way of
changing the DISPLAY variable. If there is one, please suggest.
In the meantime, I am trying to find out of the paraview on our cluster is
compiled to use off screen rendering. I will also try to have a go at using
some precompiled binaries (pvbatch) if I can find any.
cheers
Sanjay
________________________________
From: David E DeMarle <dave.demarle at kitware.com>
Sent: 18 July 2015 02:08
To: Kharche, Sanjay
Cc: paraview at paraview.org
Subject: Re: [Paraview] non-interactive viz on cluster
The error message indicates that pv batch can not connect the xwindows.
If the cluster is configured to run X for you, ensure that the job has the correct DISPLAY environment variable.
If not, you should either start X in the job ("xinit pvbatch" or something like that) or recompile paraview to use offscreen rendering.
On Saturday, July 18, 2015, Kharche, Sanjay <S.R.Kharche at exeter.ac.uk<mailto:S.R.Kharche at exeter.ac.uk>> wrote:
Dear All
I need to non-interactively make png images of a series of sequentially
numbered vts/vtk files. Since this is a large amount of data, I would like
to do this using a cluster. The cluster has paraview and OpenFoam. I am not
very familiar with OpenFoam, and have just started using Paraview in
terms of python scripts. When I submit the job, I get an error. I gather
that the error is because there is always a blank Paraview OpenGL window
that opens when I use the script below. Can someone suggest a solution?
thanks
Sanjay
error from the pbs job:
ERROR: In /home/kitware/Kitware/ParaView-3.10/source/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 541
vtkXOpenGLRenderWindow (0x1ba5ad0): bad X server connection. DISPLAY=ERROR: In /home/kitware/Kitware/ParaView-3.10/source/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 343
vtkXOpenGLRenderWindow (0x1ba5ad0): bad X server connection. DISPLAY=
My python script that I created using the GUI, and then edited for writing the png is below. I run it using the
non screen rendering option:
pvbatch --use-offscreen-rendering mouse2d.py &
mouse2d.py is this:
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
# this does not make a difference to the viz.
# SetActiveView(GetRenderView())
# GetActiveView().UseOffscreenRenderingForScreenshots = 1
# loop through all files.
for i in range (1,3999):
mouse2D_SAN1_vts = XMLStructuredGridReader( FileName=['mouse2D_SAN%d.vts' % (i)] )
mouse2D_SAN1_vts.PointArrayStatus = ['Unnamed0']
RenderView1 = GetRenderView()
DataRepresentation1 = Show()
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
RenderView1.CenterOfRotation = [78.0, 58.5, 0.0]
Transform1 = Transform( Transform="Transform" )
a1_Unnamed0_PVLookupTable = GetLookupTableForArray( "Unnamed0", 1, NanColor=[0.25, 0.0, 0.0], RGBPoints=[-0.01, 0.23, 0.299, 0.754, 1.0, 0.706, 0.016, 0.15], VectorMode='Magnitude', ColorSpace='Diverging', LockScalarRange=1 )
a1_Unnamed0_PiecewiseFunction = CreatePiecewiseFunction()
RenderView1.CameraPosition = [78.0, 58.5, 376.71107225273664]
RenderView1.CameraFocalPoint = [78.0, 58.5, 0.0]
RenderView1.CameraClippingRange = [372.94396153020926, 382.3617383365277]
RenderView1.CameraParallelScale = 97.5
DataRepresentation1.ColorArrayName = 'Unnamed0'
DataRepresentation1.LookupTable = a1_Unnamed0_PVLookupTable
Transform1.Transform = "Transform"
DataRepresentation2 = Show()
DataRepresentation2.ColorArrayName = 'Unnamed0'
DataRepresentation2.LookupTable = a1_Unnamed0_PVLookupTable
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation1.Visibility = 0
Transform1.Transform.Scale = [1.0, -1.0, 0.0]
RenderView1.CenterAxesVisibility = 0
RenderView1.CameraPosition = [78.0, -58.5, 376.71107225273664]
RenderView1.OrientationAxesVisibility = 0
RenderView1.CameraFocalPoint = [78.0, -58.5, 0.0]
RenderView1.CenterOfRotation = [78.0, -58.5, 0.0]
# Render()
WriteImage("dir_%i.png" % (i))
_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview
--
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150718/2c60d32b/attachment.html>
More information about the ParaView
mailing list