1

我对 JAVA GPU 事物 (JCuda) 完全陌生,试图测试和了解 JCuda 的工作原理以及它是否对我的需求有用(JAVA 渲染器),所以我下载了 JCuda 示例并将它们加载到 NetBeans 8 中。但是当我尝试运行任何示例文件,比如说 JCudaDriverVolumeRendererJOGL.java,我在输出窗口中收到警告/错误,特别是针对上述类的这个(但我在大多数示例文件上都遇到了错误,只有没有创建 GUI 的示例正在工作,例如 JCudaRuntimeMemoryBandwidths):

run:
aug 13, 2021 12:00:25 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
INFO: Creating ptx file for src/main/resources/kernels/JCudaDriverVolumeRendererKernel.cu
aug 13, 2021 12:00:25 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
INFO: Executing
nvcc -m64 -ptx src/main/resources/kernels/JCudaDriverVolumeRendererKernel.cu -o src/main/resources/kernels/JCudaDriverVolumeRendererKernel.ptx
Exception in thread "AWT-EventQueue-0-AWTAnimator#00" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file on thread AWT-EventQueue-0
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:92)
    at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:204)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file on thread AWT-EventQueue-0
    at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
    at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
    at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:201)
    at com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202)
    at com.jogamp.opengl.Threading.invoke(Threading.java:221)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    ... 3 more
Caused by: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: Could not create ptx file
    at jcuda.samples.utils.JCudaSamplesUtils.invokeNvcc(JCudaSamplesUtils.java:176)
    at jcuda.samples.utils.JCudaSamplesUtils.preparePtxFile(JCudaSamplesUtils.java:51)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.initCuda(JCudaDriverVolumeRendererJOGL.java:476)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.init(JCudaDriverVolumeRendererJOGL.java:455)
    at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
    at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
    at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
    ... 16 more
Caused by: java.io.IOException: Cannot run program "nvcc": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:621)
    at java.lang.Runtime.exec(Runtime.java:451)
    at java.lang.Runtime.exec(Runtime.java:348)
    at jcuda.samples.utils.JCudaSamplesUtils.invokeNvcc(JCudaSamplesUtils.java:148)
    ... 23 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:453)
    at java.lang.ProcessImpl.start(ProcessImpl.java:140)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 27 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CudaException: CUDA_ERROR_INVALID_VALUE on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at com.jogamp.opengl.Threading.invoke(Threading.java:223)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
    at sun.awt.RepaintArea.paint(RepaintArea.java:240)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
    at java.awt.Component.dispatchEventImpl(Component.java:4965)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: CUDA_ERROR_INVALID_VALUE
    at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:396)
    at jcuda.driver.JCudaDriver.cuMemcpyHtoD(JCudaDriver.java:4797)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.display(JCudaDriverVolumeRendererJOGL.java:732)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    ... 28 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CudaException: CUDA_ERROR_INVALID_VALUE on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at com.jogamp.opengl.Threading.invoke(Threading.java:223)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
    at sun.awt.RepaintArea.paint(RepaintArea.java:240)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
    at java.awt.Component.dispatchEventImpl(Component.java:4965)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: CUDA_ERROR_INVALID_VALUE
    at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:396)
    at jcuda.driver.JCudaDriver.cuMemcpyHtoD(JCudaDriver.java:4797)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.display(JCudaDriverVolumeRendererJOGL.java:732)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    ... 28 more

我在正确的路径中有所有必需的文件,您可以在下面的项目打印屏幕上看到: 在此处输入图像描述

任何人都可以向我解释这里出了什么问题(我没有在任何地方添加我的任何代码,只是示例 zip 文件中的原始文件)?

编辑

在这个具体的例子中,看起来问题是缺少“nvcc”(不管是什么),所以我在搜索那个“nvcc”,我发现它是CUDA Toolkit 10(Win7 x64 的最新版本)的一部分- 我的情况)需要下载(1.7GB)并安装在本地机器上,我现在是东东,所以一旦我完成并测试后我会更新这篇文章。但是为什么在JCuda的例子中没有提到这件事很奇怪,似乎必须自己找出困难的方法。

更新

安装该 CUDA Toolkit 后,之前的错误消失了,但弹出了新的错误:

nvcc fatal : Cannot find compiler 'cl.exe' in PATH

喜欢,。严肃地说:我们是否还需要安装 MS VisualStudio(几个无用的千兆字节,当我们只需要相对较小的 cl.exe 时)才能使用 JCuda for JAVA?!因为看起来 cl.exe 是该 MS 软件的一部分,并且没有其他方法可以获取它......好吧,除非我弄错了。

更新 2

我最终下载并安装了MSVC 2010 Express for Desktop Windows,这是第一个 - 最旧的,实际上很难找到(= 最小的安装文件大小,大约 500MB + 附带的最少不需要的垃圾,请记住:我只需要 cl.exe)-具有集成的 x64 文件支持(因为我正在使用 x64 NetBeans 在 Win7 x64 机器上编译。我还必须手动将路径添加cl.exe到系统环境变量 PATH 中(否则尽管它仍然找不到安装它后,人们会期望安装程序自己自动设置该 sys 变量,对吗?) + 在 MSVC 安装目录的 VC\bin 和一个简单的 bat 文件中手动创建名为 amd64 的新目录,否则它会结束这次在另一个错误中抱怨Microsoft Visual Studio configuration file 'vcvars64.bat' could not be found for installation at 'C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/根据这篇文章的第一个答案)但我仍然收到另一批编译错误(!!!),现在它找不到其他文件,具体来说crtdefs.h,我不知道,但我正在慢慢放弃任何其他尝试......我真的很想知道:现在这个世界上有没有人可以真正成功地运行JCuda的那些示例文件?!难以置信的...

run:
aug 13, 2021 9:20:53 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
INFO: Creating ptx file for src/main/resources/kernels/JCudaDriverVolumeRendererKernel.cu
aug 13, 2021 9:20:53 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
INFO: Executing
nvcc -m64 -ptx src/main/resources/kernels/JCudaDriverVolumeRendererKernel.cu -o src/main/resources/kernels/JCudaDriverVolumeRendererKernel.ptx
aug 13, 2021 9:20:53 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
SEVERE: nvcc process exitValue 2
aug 13, 2021 9:20:53 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
SEVERE: errorMessage:
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h(219) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

aug 13, 2021 9:20:53 PM jcuda.samples.utils.JCudaSamplesUtils invokeNvcc
SEVERE: outputMessage:
nvcc warning : nvcc support for Microsoft Visual Studio 2012 and earlier has been deprecated and is no longer being maintained
JCudaDriverVolumeRendererKernel.cu

Exception in thread "AWT-EventQueue-0-AWTAnimator#00" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file: c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h(219) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory
 on thread AWT-EventQueue-0
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:92)
    at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:204)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file: c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h(219) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory
 on thread AWT-EventQueue-0
    at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
    at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
    at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:201)
    at com.jogamp.opengl.Threading.invokeOnOpenGLThread(Threading.java:202)
    at com.jogamp.opengl.Threading.invoke(Threading.java:221)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    ... 3 more
Caused by: com.jogamp.opengl.GLException: Caught CudaException: Could not create ptx file: c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h(219) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory
 on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: Could not create ptx file: c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h(219) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

    at jcuda.samples.utils.JCudaSamplesUtils.invokeNvcc(JCudaSamplesUtils.java:170)
    at jcuda.samples.utils.JCudaSamplesUtils.preparePtxFile(JCudaSamplesUtils.java:51)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.initCuda(JCudaDriverVolumeRendererJOGL.java:476)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.init(JCudaDriverVolumeRendererJOGL.java:455)
    at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:644)
    at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:667)
    at com.jogamp.opengl.awt.GLCanvas$10.run(GLCanvas.java:1407)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1291)
    ... 16 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CudaException: CUDA_ERROR_INVALID_VALUE on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at com.jogamp.opengl.Threading.invoke(Threading.java:223)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
    at sun.awt.RepaintArea.paint(RepaintArea.java:240)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
    at java.awt.Component.dispatchEventImpl(Component.java:4965)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: CUDA_ERROR_INVALID_VALUE
    at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:396)
    at jcuda.driver.JCudaDriver.cuMemcpyHtoD(JCudaDriver.java:4797)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.display(JCudaDriverVolumeRendererJOGL.java:732)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    ... 28 more
Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught CudaException: CUDA_ERROR_INVALID_VALUE on thread AWT-EventQueue-0
    at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.opengl.awt.GLCanvas$12.run(GLCanvas.java:1438)
    at com.jogamp.opengl.Threading.invoke(Threading.java:223)
    at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:505)
    at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:559)
    at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
    at sun.awt.RepaintArea.paint(RepaintArea.java:240)
    at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:358)
    at java.awt.Component.dispatchEventImpl(Component.java:4965)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    at java.awt.EventQueue$4.run(EventQueue.java:733)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: jcuda.CudaException: CUDA_ERROR_INVALID_VALUE
    at jcuda.driver.JCudaDriver.checkResult(JCudaDriver.java:396)
    at jcuda.driver.JCudaDriver.cuMemcpyHtoD(JCudaDriver.java:4797)
    at jcuda.driver.gl.samples.JCudaDriverVolumeRendererJOGL.display(JCudaDriverVolumeRendererJOGL.java:732)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1424)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    ... 28 more
4

0 回答 0