cudaGraphicsGLRegisterBuffer error 63 on Windows

I am doing some CUDA+OpenGL program to show point clouds,
and using the same code on Windows and Linux for initialization VBO, just like:

err = cudaGraphicsGLRegisterBuffer(&vbo_image_resource, vbo_image, cudaGraphicsRegisterFlagsWriteDiscard);

And it runs well on Linux, but on Windows, the err value is 63 (cudaErrorOperatingSystem).

I have changed the parameter to cudaGraphicsRegisterFlagsNone, and the result is the same.

I have tried to Google with “cudaErrorOperatingSystem”,
but there is few results.
And I could not find the reason for this.

My develop environment is CUDA 8.0 + Surface Book(~940M)

Is there anyone met the same problem before?
Thank you.

Error 63 indicates that “an operating system call failed”

my guess would be that you are running into something like this:

You should find a way to ensure that the openGL context created by your app is being created on the surface book dGPU, as it appears that the surface book iGPU does not support OGL.

This is generally recommended for CUDA-OpenGL interop apps anyway (create the OGL context on the same GPU that has the CUDA context), and you can google for instructions on how to do it, or this writeup may help you get started:

Thanks for your reply.

It seems to be this problem.
I have tried to force to run with nvGPU, and everything went well.

I will try to 2nd link to auto select nvGPU.

After setting


at the beginning of the OpenGL program,
everything seems to be OK now.

But I am still wondering,
why I should call this even after I have called cudaSetDevice(deviceID); ?
Does this mean that I can use GPU1 for CUDA calculation, meanwhile, use GPU2 for OpenGL displaying?

Thank you again for the help.

It is possible to run CUDA/OpenGL interop on 2 different NVIDIA GPUs, where one is hosting the OGL context and one is hosting the CUDA context. This might run a little slower than the combined case, but it is possible. in your case, assuming you only have one NVIDIA GPU in your machine, you would want both the GL and CUDA contexts established on the same GPU.

Thanks for your reply.

Now I think I know that why 2 functions have been provided.

In my case, Surface Book has only 1 NV GPU, and I will all set 0.

I am having a similar issue, I posted because It was a different error and call (runtime vs driver call)

If anyone could help that would be nice