[Paraview] Building Paraview for headless rendering

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Wed Mar 21 12:58:55 EDT 2018


> 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?

Yes.

> 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?

This depends on whether you're going to build ParaView with X support
or not. If you build with OSMesa, then you don't need X, as a result
you don't need to set DISPLAY variable.

> 2. (a)

I suspect stock OSMesa is not built with support for llvmpipe which is
needed to provide newer OpenGL versions. You should build Mesa from
source with confguration options already setup in ParaView superbuild.
See [1], [2]. Alternatively, you can use the superbuild itself to
build osmesa for you, or ParaView with OSMesa support.

> I should have a fairly recent Mesa and OpenGL on a stock CentOS7 system,
> e.g.
> $ glxinfo | grep -i "OpenGL version"
> OpenGL version string: 4.6.0 NVIDIA 390.30

This is not giving you the renderer OSMesa will use. If you were
using Mesa, you'd get a "Mesa..." something in your OpenGL version
string and not NVIdia.

> Note that if I compile without the VTK_OPENGL_HAS_OSMESA, I don't get the
> above error.

That because then you're indeed using your GPU drivers.

> b) EGL

Mesa EGL is not supported as currently it does not support full
OpenGL, only OpenGL-ES.

> Or, ideally, is there a walktrough for the headless rendering Paraview
> build?

Just use the superbuild [3]. Check the readme out for more info, but
to build osmesa paraview, I'd just enable `ENABLE_paraview` and
`ENABLE_osmesa` Cmake variabels and build. You than then enable MPI
too and pick set `USE_SYSTEM_mpi` if you want to use existing MPI on
your system.

HTH,

Utkarsh


[1] https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/projects/unix/osmesa.cmake
[2] https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/projects/unix/mesa.common.cmake
[3] https://gitlab.kitware.com/paraview/paraview-superbuild


More information about the ParaView mailing list