I have this when running the plugin example (Simple_JCuda_Plugin.java) :
jcuda.CudaException: CUDA_ERROR_INVALID_IMAGE
at jcuda.utils.KernelLauncher.checkResult(KernelLauncher.java:1054)
at jcuda.utils.KernelLauncher.initModule(KernelLauncher.java:688)
at jcuda.utils.KernelLauncher.load(KernelLauncher.java:447)
at JCuda_PluginTest_.setup(JCuda_PluginTest_.java:89)
at ij.plugin.filter.PlugInFilterRunner.(PlugInFilterRunner.java:46)
at ij.IJ.runUserPlugIn(IJ.java:182)
at ij.IJ.runPlugIn(IJ.java:147)
at ij.Executer.runCommand(Executer.java:122)
at ij.Executer.run(Executer.java:59)
at java.lang.Thread.run(Thread.java:662)
References I found on the CUDA_ERROR_INVALID_IMAGE error don’t help me to run this correctly…
You probably have 64bit system? The CUBIN files are architecture specific. (There are several options in the KernelLauncher class, for either creating new CUBINS or using existing ones, or to pass parameters to the NVCC for specifying the architecture)
Yes i have a 64bits system, that’s why I had to recompile the .cubin file.
I now have an other problem when using JCudaDriverGLSample example using JOGL. i have a “Exception in thread “main” java.lang.NoClassDefFoundError: GLEventListener” even I include the jogl.jar I build in the classpath. (I’m using eclipse and all javax.media.opengl.* and com.sun.opengl.* dependencies cant be resolved).
I tried other jogl jar files I found, I have native lib too… I don’t see.
It is a little bit difficult to get the right version of JOGL - or at least it was difficult for a while: In the time when the sample was created, JOGL was in the process of migrating from Kenai to Jogamp, and in the meantime, JOGL has undergone some additional modifications. Fortunately these are mainly some package renamings, e.g.
com.sun.opengl…
is now
com.jogamp.opengl…
(this was also the reason for this thread, a similar thing applies for JCuda). Therefore, the task to update the JCuda/JOGL iteroperability samples is already on my “TODO” list, especially since the samples do not yet take into account the deprecations that have introduced with CUDA 3.2, as stated on the website.
However, with the right JOGL version and minor adjustments of the imported packages, the samples should still work. But of course, I’ll try to update the samples as soon as possible, and can probably upload them early next week.
From this archive, you will need SOME files - but not all! (If you upack all files from the archive, it may not work!).
Specifically, you need the following files: