jcuda-samples icon indicating copy to clipboard operation
jcuda-samples copied to clipboard

GL examples cause operating system call error

Open farzeber opened this issue 5 years ago • 4 comments

My computer enviroment is no problem: win10 64bit + cuda10.0 + jcuda 10.0. Other samples are passed, but there are two bugs when I test all java source (directory: driver/gl.samples) related to opengl and JCudaRuntimeUnifiedMemory.java . The former reminds me with erro massage "CUDA_ERROR_OPERATING_SYSTEM on thread AWT-EventQueue-0", and after I debug it I only conclude that it comes from a wrong return of native methond "cuGraphicsGLRegisterBufferNative" ( it doesn't appear when I use visual studio 2012 to test the methond, I don't know why). The latter will fail with a not responding even a crash. Obviously, the system call isn't successful.

farzeber avatar Mar 28 '19 01:03 farzeber

First, it is not entirely clear which sample causes the error right now:

  • The method cuGraphicsGLRegisterBuffer is only called in JCudaDriverSimpleJOGL, JCudaDriverSimpleLWJGL and JCudaDriverVolumeRendererJOGL, and not in the unified memory examples
  • The error message/constant CUDA_ERROR_OPERATING_SYSTEM is actually a driver API error. For the runtime API, it would be cudaErrorOperatingSystem. So this could only be caused by the JCudaDriverUnifiedMemory sample (and not the runtime one)
  • I just tried the GL samples as well as the unified memory examples, and could not immediately reproduce the error.

So in which example does which error appear exactly?

jcuda avatar Mar 28 '19 16:03 jcuda

Sorry, what I said isn't clear. There are two problems when I run the sample. One is that I will encounter error "CUDA_ERROR_OPERATING_SYSTEM" when I test JCudaDriverSimpleJOGL, JCudaDriverSimpleLWJGL and JCudaDriverVolumeRendererJOGL. The other is that my computer crashes when I run JCudaDriverUnifiedMemory.

farzeber avatar Mar 28 '19 16:03 farzeber

Maybe it isn't a common question, and I'm unlucy to encounter it. Good night! Don't worry it. I plan to choose pycuda for cuda accelerating

farzeber avatar Mar 28 '19 16:03 farzeber

Well, it's at least good to know that there might be an issue. The first guesses would be as usual ("Do you have the latest drivers installed" etc). But "CUDA_ERROR_OPERATING_SYSTEM" also raises the suspicion that it might be something specific for Windows 10. I could try to allocate some time to run the samples on a Win10 machine, but could not give a timeline here.

If you urgently need the specific features (GL buffer mapping and unified memory) on Windows 10, I could increase the priority here, but otherwise, I'd keep this issue mainly as a reminder, and see whether others report similar problems.

jcuda avatar Mar 28 '19 17:03 jcuda