Posted by
Nicolas Chiaruttini on
URL: http://imagej.273.s1.nabble.com/Help-setting-up-JCuda-ImageJ-Netbeans-tp5012316.html
Dear all,
I'ml currently trying to develop a 3D GPU based segmentation plugin for ImageJ. I learned Cuda programming on this wonderful website :
https://www.udacity.com/course/cs344And I usually develop in Java by using the IDE Netbeans.
I first wrote my ImageJ plugin without GPU computing. I see my method is working, but very slow as expected. I need to speed up the process using GPUs. And I'm stuck at setting the correct CUDA environment...
Is there anyone that can help me ?
- I have Windows 7 64 bits,
- I installed the last Cuda toolkit v6.5
- and the binaries for windows x64 of JCuda
http://www.jcuda.org/downloads/downloads.html- I can provide more informations if necessary...
At this point I have to admit I'm lost and desperate - I setup a lot of environment variables so that some dll can be linked correctly - I copied and paste the jar and dll of JCuda a bit everywhere in the folders so that Java could find it at least in one place... I know that something happened since the error when I tried to compile "Simple_JCuda_Plugin.java" has changed. But know I'm stuck, having desesperately the same error (listed at the end of this email).
Is there anyone who can help me or who knows a more simple way of developping using Cuda (maven ? / Change OS ? ).
Some help would be very much appreciated...
Thanks
Nicolas
------------------------------------------
run:
Failed to access class 'jcuda/driver/CUoccupancyB2DSize'
Error while loading native library "JCudaDriver-windows-x86_64" with base name "JCudaDriver"
Operating system name: Windows 7
Architecture : amd64
Architecture bit size: 64
Stack trace from the attempt to load the library as a resource:
java.lang.NullPointerException: No resource found with name '/lib/JCudaDriver-windows-x86_64.dll' ----->> But I can see this file! I copied it everywhere! It is in the lib folder (and everywhere around in case I missed something)
at jcuda.LibUtils.loadLibraryResource(LibUtils.java:151)
at jcuda.LibUtils.loadLibrary(LibUtils.java:83)
at jcuda.driver.JCudaDriver.<clinit>(JCudaDriver.java:225)
at jcuda.utils.KernelLauncher.initialize(KernelLauncher.java:603)
at jcuda.utils.KernelLauncher.<init>(KernelLauncher.java:586)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:393)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:321)
at jcuda.utils.KernelLauncher.compile(KernelLauncher.java:270)
at ijcudaplugintest.Simple_JCuda_Plugin.setup(Simple_JCuda_Plugin.java:128)
at ijcudaplugintest.IJCudaPluginTest.main(IJCudaPluginTest.java:74)
Stack trace from the attempt to load the library as a file:
java.lang.NoClassDefFoundError: jcuda/driver/CUoccupancyB2DSize
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at jcuda.LibUtils.loadLibrary(LibUtils.java:94)
at jcuda.driver.JCudaDriver.<clinit>(JCudaDriver.java:225)
at jcuda.utils.KernelLauncher.initialize(KernelLauncher.java:603)
at jcuda.utils.KernelLauncher.<init>(KernelLauncher.java:586)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:393)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:321)
at jcuda.utils.KernelLauncher.compile(KernelLauncher.java:270)
at ijcudaplugintest.Simple_JCuda_Plugin.setup(Simple_JCuda_Plugin.java:128)
at ijcudaplugintest.IJCudaPluginTest.main(IJCudaPluginTest.java:74)
Caused by: java.lang.ClassNotFoundException: jcuda.driver.CUoccupancyB2DSize
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load the native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:129)
at jcuda.driver.JCudaDriver.<clinit>(JCudaDriver.java:225)
at jcuda.utils.KernelLauncher.initialize(KernelLauncher.java:603)
at jcuda.utils.KernelLauncher.<init>(KernelLauncher.java:586)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:393)
at jcuda.utils.KernelLauncher.create(KernelLauncher.java:321)
at jcuda.utils.KernelLauncher.compile(KernelLauncher.java:270)
at ijcudaplugintest.Simple_JCuda_Plugin.setup(Simple_JCuda_Plugin.java:128)
at ijcudaplugintest.IJCudaPluginTest.main(IJCudaPluginTest.java:74)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
----------------------------------------
Nicolas Chiaruttini, PhD
Aurélien Roux lab,
Biochemistry Department
University of Geneva, Science II
30 quai Ernest Ansermet
CH-1211 Geneva 4, Switzerland
Tel: +41 (0) 22 379 36 48<tel:%2B41%20%280%29%2022%20379%2036%2048>
Personal website:
http://kiaru.eu/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html