optixMotionBlur Unknown error

Although I have built Optix 5.1 successfully, I am not able to run some of the SDK examples. For example, optixMotionBlur.

See:

[ 97%] Built target primeMultiGpu
[ 98%] Linking CXX executable ../bin/primeMultiBuffering
[ 98%] Built target primeMultiBuffering
[100%] Linking CXX executable ../bin/primeSimplePP
[100%] Built target primeSimplePP
$ cd bin
$ ./optixDeviceQuery 
OptiX 5.1.1
Number of Devices = 1

Device 0 (0000:26:00.0): Quadro M2000
  Compute Support: 5 2
  Total Memory: 4236902400 bytes
  Clock Rate: 1162500 kilohertz
  Max. Threads per Block: 1024
  SM Count: 6
  Execution Timeout Enabled: 1
  Max. HW Texture Count: 1048576
  TCC driver enabled: 0
  CUDA Device Ordinal: 0

Constructing a context...
  Created with 1 device(s)
  Supports 2147483647 simultaneous textures
  Free memory:
    Device 0: 4045930496 bytes

$ ./optixMotionBlur 
No animation specified; using default translation of (0.1, 0, 0) times scene scale
OptiX Error: 'Unknown error (Details: Function "RTresult _rtBufferCreateFromGLBO(RTcontext, unsigned int, unsigned int, RTbuffer_api**)" caught exception: Encountered a CUDA error: cuGLGetDevices returned (304): Operating system call failed
================================================================================
Backtrace:
	(0) () +0x711f17
	(1) () +0x7102cb
	(2) () +0x321a7f
	(3) () +0x19eb43
	(4) rtBufferCreateFromGLBO() +0x5b1
	(5) createBufferImpl(optix::Handle<optix::ContextObj>, RTformat, unsigned int, unsigned int, bool, RTbuffertype) +0xea
	(6) sutil::createOutputBuffer(optix::Handle<optix::ContextObj>, RTformat, unsigned int, unsigned int, bool) +0x40
	(7) createContext(int) +0x223
	(8) main() +0x287
	(9) __libc_start_main() +0xe7
	(10) _start() +0x2a

================================================================================
)'
$

If rtBufferCreateFromGLBO fails that is a sign for no proper NVIDIA OpenGL implementation being found by the application to do the OpenGL interoperabilty for the output buffer for faster display of the result.
That your system reports a CUDA error that cuGLGetDevices fails indicates that as well.

You would either need to install a compatible NVIDIA OpenGL driver to allow that fast display of the output buffer or disable the OpenGL interop inside the application. For the latter, search this forum for rtBufferCreateFromGLBO or use the -h or --help command on the examples to find the necessary command line option.

Regarding the Nvidia OpenGL driver, I have installed the following packages

$ dpkg -l | grep mesa-*
ii  libegl-mesa0:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the EGL API -- Mesa vendor library
ii  libegl1-mesa:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        transitional dummy package
ii  libegl1-mesa-dev:amd64                     18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the EGL API -- development files
ii  libgl1-mesa-dev:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        transitional dummy package
ii  libglapi-mesa:amd64                        18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the GL API -- shared library
ii  libgles2-mesa-dev:amd64                    18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL|ES 2.x API -- development files
ii  libglu1-mesa:amd64                         9.0.0-2.1build1                             amd64        Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:amd64                     9.0.0-2.1build1                             amd64        Mesa OpenGL utility library -- development files
ii  libglx-mesa0:amd64                         18.0.5-0ubuntu0~18.04.1                     amd64        free implementation of the OpenGL API -- GLX vendor library
ii  libwayland-egl1-mesa:amd64                 18.0.5-0ubuntu0~18.04.1                     amd64        implementation of the Wayland EGL platform -- runtime
ii  mesa-common-dev:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        Developer documentation for Mesa
ii  mesa-utils                                 8.4.0-1                                     amd64        Miscellaneous Mesa GL utilities
ii  mesa-utils-extra                           8.4.0-1                                     amd64        Miscellaneous Mesa utilies (opengles, egl)
ii  mesa-va-drivers:amd64                      18.0.5-0ubuntu0~18.04.1                     amd64        Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:amd64                   18.0.5-0ubuntu0~18.04.1                     amd64        Mesa VDPAU video acceleration drivers

As a summary, the OpenGL version is

$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 18.0.5

You would either need to install a compatible NVIDIA OpenGL driver
What is that exactly? Can I obtain that from nvidia website?

I can’t help much with Linux driver specific questions myself.
The NVIDIA display driver download search page is this: [url]https://www.nvidia.com/Download/Find.aspx?lang=en-us[/url]

If the CUDA driver (with support for CUDA 9.0 or higher, see the release notes of OptiX and your driver version) works on your system, disabling OpenGL interop buffers inside the application with the command line option --nopbo available in most OptiX SDK examples should be enough to get things going without updating drivers.
The optixConsole example inside the OptiX SDK should just work in that case, because it only prints ASCII characters.

Thank you. The “-n | --nopbo” fixes that at the moment.