CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Using offscreen rendering

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2012, 09:53
Default Using offscreen rendering
  #1
JPW
New Member
 
James Walker
Join Date: Jul 2012
Posts: 6
Rep Power: 14
JPW is on a distinguished road
I have create some scripts for producing images and animations of data rendered in ParaView. I run these scripts in pvbatch, but a window opens in the top left when the script is ran, and closes at the end.

How can I achieve total off-screen rendering?

I have also used the flag --use-offscreen-rendering, but I still get the same result.

The help for --use-offscreen-rendering says :"This option only works with software rendering or mangled mesa on Unix". I am using Red Hat Linux. How can I enable this?


Thanks for any help
James
JPW is offline   Reply With Quote

Old   July 24, 2012, 16:07
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi James,

OK, here there are (at least) two possibilities:
  1. You might have to install the "mesa utils" system package. This one I can't confirm myself before the end of this week.
  2. You might need to build your own version of ParaView!
    If you were using OpenFOAM, it should or would be as simple as using the right options in makeParaView... if not, then again only at the end of this week would I be able to look deeper into this.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 25, 2012, 05:19
Default
  #3
JPW
New Member
 
James Walker
Join Date: Jul 2012
Posts: 6
Rep Power: 14
JPW is on a distinguished road
Hi Bruno,

if you could let me know the results that would be great!

At the moment I am using Xvfb (X virtual framebuffer) so that nothing is shown to the screen.


Thanks
James
JPW is offline   Reply With Quote

Old   July 30, 2012, 18:02
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi James,

OK, the test machine (virtual in fact) was an Ubuntu 11.10 x86_64. The test script I used was this:
Code:
from paraview.simple import *
cone = Cone(Resolution=32)
cone.Center = [1, 2, 3]
shrinkFilter = Shrink(cone)
shrinkFilter.UpdatePipeline()
Show(shrinkFilter)
Render()
WriteImage('test2.png')
The command line, directly from ParaView's "bin" folder was:
Code:
./pvbatch --use-offscreen-rendering
With or without the command "Render()", it still opens an X window, but nothing is rendered inside that window. This might be because of the mesa drivers that I had installed on the test system.

As for RHEL, it looks like you need to install the package "mesa-libOSMesa" (and maybe "mesa-libOSMesa-devel" as well). The "OSMesa" stands for:
Quote:
Originally Posted by http://www.xfree86.org/4.8.0/DRI8.html#16
OSMesa (Off-Screen Mesa) is an interface and driver for rendering 3D images into a user-allocated block of memory rather than an on-screen window.
Last but not least, you can also try this:
Quote:
Originally Posted by preichl View Post
Setting the environment variable via the command below worked for me.

export LIBGL_ALWAYS_INDIRECT=y
With this option, the window was only opened very briefly!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 11, 2014, 11:07
Default
  #5
Member
 
Join Date: Mar 2009
Posts: 90
Rep Power: 17
aerogt3 is on a distinguished road
I have a cluster on which I am trying to run, but keep getting the following errors:

Quote:
ERROR: In /depot/ParaView-v4.1.0-src/VTK/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 531
vtkXOpenGLRenderWindow (0x3497320): bad X server connection. DISPLAY=:0. Aborting.
I am able to run a python script which writes images using pvbatch. I am able to do so by manually launching pvbatch on one of the cluster nodes, and the images are properly written and the --use-offscreen-rendering flag seems to work as intended (the cluster has no graphics cards anywhere.)

However, as soon as I run on multiple nodes via submit script, I get the above errors. Here are the relevant parts of my submit script:

Quote:
module load openmpi/1.6.5

/usr/mpi/gcc/openmpi-1.6.5/bin/mpiexec -n 128 /opt/paraview/4.1.m/bin/pvbatch --mpi --use-offscreen-rendering script.py script_args
aerogt3 is offline   Reply With Quote

Old   August 17, 2014, 12:56
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings aerogt3,

Only today did I finally managed to give a quick look into this.
Quote:
Originally Posted by aerogt3 View Post
I am able to run a python script which writes images using pvbatch. I am able to do so by manually launching pvbatch on one of the cluster nodes, and the images are properly written and the --use-offscreen-rendering flag seems to work as intended (the cluster has no graphics cards anywhere.)
According to my searches online and the test I made on my machine, it seems that we are able to use the "offscreen" option when there is a valid setting in "DISPLAY". In other words, if you run the following commands on your local machine or on the target node:
Code:
pvbatch --use-offscreen-rendering test.py
unset DISPLAY
pvbatch --use-offscreen-rendering test.py
The first command will work just fine, without any windows appearing, but the second command will give the same complaint.

Therefore, either you used "ssh -X" or a VNC connection to access the cluster node, so that there was a valid display ready to be used for off-screen rendering.

The solution seems to be to build ParaView with OSMesa: http://www.paraview.org/Wiki/Setting...OSMesa_support - which means OSMesa will then have to be installed on all cluster nodes and the same ParaView build will also have to be installed on them.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Rendering Speedup (3 Minutes per Step) Tobi ParaView 3 November 20, 2019 02:33
offscreen rendering test lakeat OpenFOAM Post-Processing 0 July 9, 2014 12:11
[General] Off-screen rendering with ParaView kilroy ParaView 1 October 11, 2013 19:25
CFX problem in ubuntu (linux) Vigneshramaero CFX 0 July 13, 2012 11:22
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52


All times are GMT -4. The time now is 10:23.