<div dir="ltr">Hi Martin,<div class="gmail_extra"><br clear="all"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">we have an user who wants to use Paraview in headless mode. We found the hard way that the binary does not have the headless rendering enabled.<br></blockquote><div><br></div><div>Yes and no.  The pre-built binaries you download do require an X server to be present.  However, that can be achieved in many different ways.  One common approach for a headless environment is to use Xvnc to start up a fake X server that you never actually look at or log in to.  You can then set the DISPLAY variable to whatever that starts up as and have ParaView use it.  You can then use the included mesa libraries via the --mesa-swr or --mesa-llvmpipe flags to pvserver or pvbatch.  Given that, you could get away with probably using the pre-built binaries as the easiest route. That being said, if you still want to build your own, I'll go ahead and answer your remaining questions.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">1. A more genereal question first - our cluster nodes don't have good GPUs so the plan is to render on the CPU. I assume we need Mesa for it, right?</blockquote><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Yes.  CPU based rendering will be via the mesa llvmpipe or swr drivers.  If you have relatively new Intel CPUs, i.e. SandyBridge or newer, then you'll want to use the swr driver as it's far more performant and scalable.</div><br class="gmail-Apple-interchange-newline"> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Further, since we want to render on the server, do we need to set the DISPLAY variable to :0, or, is there any other way to tell this to Paraview?<br></blockquote><div><br></div><div>If you're building using OSMesa tfor off-screen-only rendering then the DISPLAY variable has no meaning and is not needed.  It's used to tell ParaView which X server to use for rendering (see above with starting a virtual X server via vnc).</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2. As for our attempted build, I tried both the OSMesa and EGL with the following results:<br>
<br>
a) OSMesa - turn VTK_OPENGL_HAS_OSMESA on, cmake finds my OS installed OSMesa (CentOS7 - mesa-libOSMesa-devel-17.0.1-6.<wbr>20170307.el7.x86_64), everything builds, but, when I try to run Paraview, I get:<br>
ERROR: In /uufs/<a href="http://chpc.utah.edu/sys/srcdir/paraview/5.4.0/VTK/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx" rel="noreferrer" target="_blank">chpc.utah.edu/sys/srcdir<wbr>/paraview/5.4.0/VTK/Rendering/<wbr>OpenGL2/vtkOpenGLRenderWindow.<wbr>cxx</a>, line 831<br>
vtkXOpenGLRenderWindow (0x425a480): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.<br></blockquote><div><br></div><div>Try setting both -DVTK_OPENGL_HAS_OSMESA=ON and -DVTK_OPENGL_USE_X=OFF .  If it's still fussy,then set the environment variable MESA_GL_VERSION_OVERRIDE=3.3 .  It shouldn't be an issue if you use the latest Mesa but the shipped 17.0.1 with CentOS may be a bit buggy.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
b) EGL<br></blockquote><div><br></div><div>The current EGL support is really only for use with offscreen rendering on NVidia GPUs and does not yet work with the Mesa EGL implementation.</div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As I mentioned, we are running a fairly stock CentOS 7.4.<br></blockquote><div><br></div><div>You're best bet is to build your own Mesa rather than rely on the system package since a newer release will include the swr driver and be more performant.</div><div><br></div><div>Or if you can use use the pre-built binaries with a dummy X server, you might save yourself a lot of headaches.</div><div><br></div><div>- Chuck</div></div></div></div>