Exception caught when running samples with two devices installed

Hi,
I’m now working with a new computer with two GTX1080Ti installed. When I run the Samples in SDK, the command window prints messages

Unknown error(Details:Function "_rtBufferCreateFromGLBO" caught exception: Only single CUDA device for GL context supported)

At present I don’t want to make full use of the devices. Just single device would be suitable for me. How can I avoid the exception and run demos normally as before?
Thanks a lot!

The error means that the OpenGL interop buffer could not be created in that dual GPU configuration.
That happens because in shipping OptiX SDKs, the output and input_output buffers are allocated in pinned memory on the host if multiple devices are set inside the OptiX context.
These buffers in pinned memory are accessible by multiple GPUs and since that buffer is not on the device it cannot be an OpenGL interop buffer which is a PixelBufferObject (PBO) on the device.

Please have a look into some of these threads about multi-GPU in OptiX.
[url]https://devtalk.nvidia.com/default/topic/1036340/?comment=5264830[/url]

The simple solutions to that are

If you’re new to OptiX I’d recommend to read though the programming guide [url]http://raytracing-docs.nvidia.com/optix/index.html[/url], watch the OptiX Introduction presentation from GTC 2018, and work through the provided open source example code on github. Links in the sticky post above.