hello,
i am working with ubuntu 10.04 64 bit and eclipse. i installed the CUDA toolkit 3.2RC and the respective driver (both 64 bit).
the command
$ java -version yields
java version “1.6.0_18”
OpenJDK Runtime Environment (IcedTea6 1.8.2) (6b18-1.8.2-4ubuntu2)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)
the NVIDIA samples are compiling and running just fine and the deviceQuery outputs:
./deviceQuery Starting…
CUDA Device Query (Runtime API) version (CUDART static linking)
There is 1 device supporting CUDA
Device 0: “GeForce 9800 GT”
CUDA Driver Version: 3.20
CUDA Runtime Version: 3.20
CUDA Capability Major/Minor version number: 1.1
Total amount of global memory: 536150016 bytes
Multiprocessors x Cores/MP = Cores: 14 (MP) x 8 (Cores/MP) = 112 (Cores)
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 8192
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 2147483647 bytes
Texture alignment: 256 bytes
Clock rate: 1.50 GHz
Concurrent copy and execution: Yes
Run time limit on kernels: Yes
Integrated: No
Support host page-locked memory mapping: Yes
Compute mode: Default (multiple host threads can use this device simultaneously)
Concurrent kernel execution: No
Device has ECC support enabled: No
Device is using TCC driver mode: No
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 3.20, CUDA Runtime Version = 3.20, NumDevs = 1, Device = GeForce 9800 GT
PASSED
Press to Quit…
so cuda is running fine. unfortunately, the execution of the Minimalbesipiel
[LEFT][FONT=Courier New]import jcuda.;
import jcuda.runtime.;
public class JCudaRuntimeTest
{
public static void main(String args[])
{
Pointer pointer = new Pointer();
JCuda.cudaMalloc(pointer, 4);
System.out.println("Pointer: "+pointer);
JCuda.cudaFree(pointer);
}
}
[/FONT]
[/LEFT]
delivers
Error while loading native library with base name “JCudaRuntime”
Operating system name: Linux
Architecture : amd64
Architecture bit size: 64
Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:79)
at jcuda.runtime.JCuda.assertInit(JCuda.java:225)
at jcuda.runtime.JCuda.cudaMalloc(JCuda.java:1775)
at testi.main(testi.java:9)
when i try to run it with eclipse. in a command line i get the same result.
$ javac -cp “.:jcuda-0.3.2RC.jar” Minimalbeispiel.java does not throw any errors
but
$ java -cp “.:jcuda-0.3.2RC.jar” Minimalbeispiel does give
Error while loading native library with base name “JCudaRuntime”
Operating system name: Linux
Architecture : amd64
Architecture bit size: 64
Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load native library
at jcuda.LibUtils.loadLibrary(LibUtils.java:79)
at jcuda.runtime.JCuda.assertInit(JCuda.java:225)
at jcuda.runtime.JCuda.cudaMalloc(JCuda.java:1775)
at testi.main(testi.java:9)
i followed the suggestions of putting the .so and .jar files in the root directory of the project but this didn’t help.
maybe i still get something wrong.
hope someone can help.
cheers