Is headless mode not working or am I missing something?

Hi,

I am having trouble with the recent ParaView Server for Headless Machines (osmesa) binaries such that it is looking for and failing to find GL libs.

$ ./ParaView-5.9.1-osmesa-MPI-Linux-Python3.8-64bit/bin/pvpython
Python 3.8.8 (default, May 17 2021, 15:56:25)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

“” I can read, render and save images fine with 5.9.“”"

$ ./ParaView-5.10.1-osmesa-MPI-Linux-Python3.9-x86_64/bin/pvpython
/home/demo/netcdf_files_orca025/ParaView-5.10.1-osmesa-MPI-Linux-Python3.9-x86_64/bin/pvpython-real: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

$ ./ParaView-5.11.2-osmesa-MPI-Linux-Python3.9-x86_64/bin/pvpython
/home/demo/netcdf_files_orca025/ParaView-5.11.2-osmesa-MPI-Linux-Python3.9-x86_64/bin/pvpython-real: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

$ ./ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86_64/bin/pvpython
/home/demo/netcdf_files_orca025/ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86_64/bin/pvpython-real: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

Combinations of --disable-xdisplay-test, --force-offscreen-rendering, and --mesa --backend swr do not seem to help and I don’t see anything related in the 5.10 release notes.

What am I missing?

thanks!

Hmm. Does it work better if you pass --mesa?

nope.

$ ./ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86_64/bin/pvpython --mesa
/home/demo/netcdf_files_orca025/ParaView-5.12.0-osmesa-MPI-Linux-Python3.10-x86_64/bin/pvpython-real: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

Note, a build of ParaView 5.12 from paraview-superbuild with osmesa turned on works fine on the machine. The problem is just that the published binary does not.

I confirm that the ParaView 5.12.0 osmesa NEEDS libglapi.so.0 and other OpenGL related libraries:

 ldd ./bin/pvpython-real
   [...]
   libglapi.so.0 => /usr/lib/libglapi.so.0 (0x0000779869e24000)
   [...]
   libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0 (0x0000779864fc0000)
   libGLX.so.0 => /usr/lib/libGLX.so.0 (0x0000779864f8e000)
   libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000779864f63000)

This is definitely unexpected, my suspicion is that one of our dependency links to it.

According to libtree:

libglapi is needed by osmesa (!!!):

│   │   │   ├── libOSMesa.so.8 [runpath]
│   │   │   │   ├── libz.so.1 [rpath]
│   │   │   │   ├── libglapi.so.0 [default path]
│   │   │   │   └── libpthread.so.0 [default path]

And libGL* and libx* are linked by open cascade:

│   │   │   │   │   │   ├── libTKService.so.7.7 [rpath]
│   │   │   │   │   │   │   └── libX11.so.6 [default path]
│   │   │   │   │   │   │       └── libxcb.so.1 [default path]
│   │   │   │   │   │   │           ├── libXau.so.6 [default path]
│   │   │   │   │   │   │           └── libXdmcp.so.6 [default path]

│   │   │   │   │   ├── libTKV3d.so.7.7 [rpath]
│   │   │   │   │   │   ├── libGL.so.1 [default path]
│   │   │   │   │   │   │   ├── libGLdispatch.so.0 [default path]
│   │   │   │   │   │   │   └── libGLX.so.0 [default path]
│   │   │   │   │   │   │       ├── libGLdispatch.so.0 [default path]
│   │   │   │   │   │   │       └── libX11.so.6 [default path]
│   │   │   │   │   │   ├── libX11.so.6 [default path]

To work around this, one simply needs to install the packages but it would be better to not need them at all.

So libglapi links seems to be intentional (?) and the rest should be carved out of the opencascade lib by patching it. @Dave_DeMarle , please open an issue on https://gitlab.kitware.com/paraview/paraview-superbuild/.

Thanks, paraview 5.10,11,12 headless mesa binaries do not work on headless (gl less) systems (#277) · Issues · ParaView / ParaView-Superbuild · GitLab (kitware.com)

We ought to test the headless version on a clean docker image imo.

FYI @cory.quammen