1

I am comletelly new to JAVA GPU thing (JCuda), trying to test and understand how JCuda works and if it can be any useful to my needs (JAVA renderer), so I downloaded JCuda examples and loaded them into NetBeans 8. But when I try to run any of the example files, let's say JCudaDriverVolumeRendererJOGL.java, I get warning/errors in output window, specifically this one for the above class (but I got errors on most of those example files, only examples that are creating no GUI are working, like example 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

I have all the required files in the right paths as you can see here below on the project printscreen: enter image description here

Anyone can explain to me what is wrong here (I did not add any code of mine anywhere, just original files coming in the examples zip file)?

EDIT

In this specific example, it looks like the problem is missing "nvcc" (whatever that is), so I was searching for that "nvcc", and I found out it is a part of the CUDA Toolkit 10 (latest version for Win7 x64 - my case) that needs to be downloaded (1.7GB) and installed on local machine, which I am dong right now, so I will update this post once I got it done and tested. But why there is no mention about this thing in JCuda examples is strange, one have to find out the hard way like this on his own, it seems.

UPDATE

After installing that CUDA Toolkit the previous error is gone, but new one pops up:

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

Like,. seriously: are we required to have MS VisualStudio installed as well (several useless gigabytes, when we only need relatively tiny cl.exe) just to be able using JCuda for JAVA?! Cos it looks that cl.exe is part of that MS software and there is no other way how to obtain it...well, unless I am mistaken.

UPDATE 2

I ended up downloading and installing the MSVC 2010 Express for Desktop Windows, which was the 1st one - oldest one, pretty hard to find actually (= smallest install files size, around 500MB + the minimum of not-needed garbage that comes with it, remember: I just needed cl.exe) - having integrated x64 files support (as I am compiling on Win7 x64 machine with x64 NetBeans. I also had to manually add path to cl.exe into system environment variable PATH (else it would still not be found despite having it installed, one would expect installer should set that sys variable automatically by itself, right?) + manually create new directory called amd64 inside the VC\bin of the MSVC install directory and one simple bat file there too, else it would end up in another error this time complaining about 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/ ( according to this post's 1st answer ) YET I AM STILL GETTING ANOTHER BUNCH OF COMPILING ERRORS (!!!), now it cannot find another files, specifically crtdefs.h, I don't know but I am slowly giving up any other trying...I really do wonder: is there abnyone in this world in these days that could actually successfully run those example files of JCuda?! Unbelievable...

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
qraqatit
  • 492
  • 4
  • 14
  • "Cannot run program "nvcc": CreateProcess error=2, The system cannot find the file specified" would seem to be the issue. – Andy Turner Aug 13 '21 at 10:30
  • yes, I saw that, but I do not get what it is or why is it not in resources folder that comes with the examples zip file of JCuda. I even don't know where to get it...like they make examples that are not working cos they did not included all the required files? Or am I wrong again? – qraqatit Aug 13 '21 at 10:31
  • I had these problems and steel facing new ones. you must 0- first of all, have a CUDA enabled graphic card 1- install NVIDIA graphic driver for your windows 3- install Visual Studio 2010 and add path for lc.exe to PATH, 4-download and install MSVCV3 which is Microsoft redistribution for C++ you can get it from Visual Studio Installer or Microsoft website, then add path to PATH. 5- install NVIDIA CUDA toolkit for using CUDA if it not installed yet, it may be installs with NSight, i don't remember 6- disable GeForce experience which is installed with NVIDIA, it makes another memory errors .... – morteza Oct 28 '22 at 12:30

0 Answers0