Encountered a rtcore error: m_api.deviceContextCreateForCUDA( context, properties, devctx )


I am trying to run optix_advanced_samples on my machine.

I can run the optixDeviceQuery and primeSimple, but when I run optixConsole here comes a new error:

terminate called after throwing an instance of ‘optix::Exception’
what(): Unknown error (Details: Function “RTresult _rtBufferCreate(RTcontext, unsigned int, RTbuffer_api**)” caught exception: Encountered a rtcore error: m_api.deviceContextCreateForCUDA( context, properties, devctx ) returned (2147483647): Unknown)
Aborted (core dumped)

Here is my configuration: Optix 6.5, Cuda 10.2, driver 455.28, RTX 3080 GPU, and Ubuntu 18.04.

Here is how I configure ccmake:

I also tried compile the renderer using cuda 11.1, but it still doesn’t work. I do have posted the issue here and got replied. I really appreciate for the help. Since it is an urgent case for me, I open a new topic here to see if someone else has encountered this issue. I really appreciate it if someone can help me! Thanks in advance!

Hi there. It still looks like your driver configuration is broken. Did you go through the steps in Ingo’s blog post carefully?

Have you tried the most recent 460 driver? It’s available from the linux beta driver pages.

If those don’t help, then I think it might be worth trying to run some of the CUDA samples from the CUDA SDK. To me, it looks like the error you have is an error initializing CUDA, not OptiX. If CUDA can’t run, then OptiX won’t be able to run either. And for CUDA initialization to fail, that almost certainly means the driver isn’t running properly or isn’t installed properly. Can you build and run the 0_Simple/simpleDrvRuntime sample from the cuda-11.1 SDK and send me the output? Try some of the other samples as well.

Note if you’ve installed cuda-11.1 in your /usr/local folder, you may need to build the samples using sudo or root access. I believe you can install the CUDA toolkit in your home directory, if you don’t have root access or would prefer not to use it. Now that I mention this, did you install CUDA using root access? Maybe permissions are part of the problem you’re having.


Thank you David, I will try it out!