Hi all,
I know you see a lot of these questions, but I haven’t got a clue how to proceed I have a CUDA enabled macbook pro and am able to run the CUDA example programs and compile *.cu programs with nvcc and run them.
I wanted to experiment with JCuda.
I am running 64 bit os x 10.7.4
I downloaded
http://www.jcuda.de/downloads/JCuda-All-0.4.1-bin-apple-x86_64.zip
http://www.jcuda.de/utilities/jcudaUtils-0.0.4.jar
I then try to run
KernelLauncherSample from an IntelliJ project - I have
jcuda-0.4.1.jar
jcudaUtils-0.0.4.jar
libJCudaDriver-apple-x86_64.dylib
libJCudaRuntime-apple-x86_64.dylib
in a libs folder which is a dependancy folder in the IntelliJ project
When I run the class I get the following error
Error while loading native library „JCudaDriver-apple-x86_64“ with base name „JCudaDriver“
Operating system name: Mac OS X
Architecture : x86_64
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/libJCudaDriver-apple-x86_64.jnilib‘
at jcuda.LibUtils.loadLibraryResource(LibUtils.java:151)
at jcuda.LibUtils.loadLibrary(LibUtils.java:83)
at jcuda.driver.JCudaDriver.(JCudaDriver.java:206)
at KernelLauncherSample.main(KernelLauncherSample.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no JCudaDriver-apple-x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at jcuda.LibUtils.loadLibrary(LibUtils.java:94)
at jcuda.driver.JCudaDriver.(JCudaDriver.java:206)
at KernelLauncherSample.main(KernelLauncherSample.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Exception in thread „main“ java.lang.UnsatisfiedLinkError: Could not load the native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:129)
at jcuda.driver.JCudaDriver.(JCudaDriver.java:206)
at KernelLauncherSample.main(KernelLauncherSample.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 1
I notice that the JCuda archive only contained dylib files and not jnilib files. Is this an issue - If not where do I put the dylib files?
I am sorry but I don’t have a clue about this.
Conrad