I have a Cuda error in my software I don’t understand.
This error occurs when I register a new OpenGL PBO for Cuda-OpenGL interoperability (using cudaGraphicsGLRegisterBuffer) between other Cuda operations. The error is not returned by the cudaGraphicsGLRegisterBuffer function itself but by a subsequent call to cudaMalloc or cuModuleLoadData (depending on the context).
In my full software, I get an “unknown error” while in the example (in attachment), I get a CUDA_ERROR_SHARED_OBJECT_INIT_FAILED error.
I’ve spent a few days hunting that bug but still don’t have any clue !!
I’ve managed to create a small example (in attachment) to illustrate this bug.
The error is returned by the cuModuleLoadData call in the loadModule function.
If I comment out the createPBO function call, the example works fine.
My configuration is:
- Windows 7 64 bits
- CUDA 5.0
- 306.94 driver
- 32 bits application built using Microsoft Visual Studio 2008 SP1
- Qt 4.7.4 (Qt is only used in that sample to create a valid OpenGL context quickly.)
- Executing on a Tesla C2050 card
Thank you in advance.
[EDIT] My attachment is still being scanned. You may find the example source code on that page : http://stackoverflow.com/questions/15388643/cuda-error-shared-object-init-failed-error-after-cuda-opengl-interoperability
main.cpp (2.41 KB)