jcuda.CudaException: CUDA_ERROR_INVALID_IMAGE

Hi all,

I just install all required files to devellop an ImageJ plugin with Jcuda like describe at jcuda.org - ImageJ Plugin HowTo

I have no any more UnsatisfiedLinkError :smiley:

But…

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…

Thanks you if you have any idea…

P.

Ok,

I just recompiled simpleJCudaPluginKernel.cu to resolve my problem (with : nvcc -cubin simpleJCudaPluginKernel.cu -o simpleJCudaPluginKernel.cubin)

A+

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.

Any idea ?

P.

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.

The JCuda/JOGL interoperability samples have been updated for the latest version of JOGL.

@P.: You may obtain one of the builds of JOGL from http://jogamp.org/deployment/webstart (e.g. this one for Windows).

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:


gluegen-rt.dll
gluegen-rt.jar
jogl.all.jar
jogl_desktop.dll
nativewindow.all.jar
nativewindow_awt.dll
nativewindow_win32.dll
newt.all.jar
newt.dll

(or the respective Linux libraries instead of the DLLs). The JAR files should be added to the classpath.

Then the samples from the JCuda samples page should work.