jcuda library usage problem
- by user513164
hi m very new to java and Linux i have a code which is taken from examples of jcuda.the code is following
import jcuda.CUDA;
import jcuda.driver.CUdevprop;
import jcuda.driver.types.CUdevice;
public class EnumDevices {
public static void main(String args[]) {
//Init CUDA Driver
CUDA cuda = new CUDA(true);
int count = cuda.getDeviceCount();
System.out.println("Total number of devices: " + count);
for (int i = 0; i < count; i++) {
CUdevice dev = cuda.getDevice(i);
String name = cuda.getDeviceName(dev);
System.out.println("Name: " + name);
int version[] = cuda.getDeviceComputeCapability(dev);
System.out.println("Version: " + String.format("%d.%d", version[0], version[1]));
CUdevprop prop = cuda.getDeviceProperties(dev);
System.out.println("Clock rate: " + prop.clockRate + " MHz");
System.out.println("Threads per block: " + prop.maxThreadsPerBlock);
}
}
}
I'm using Ubuntu as my operating system i compiled it with following command
1:-javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices
i got following error
error: Class names, 'EnumDevices', are only accepted if annotation processing is explicitly requested
1 error
i don't know what is the meaning of this error.what should i do to compile the program
than i changed the compiling option which is
javac -cp /home/manish.yadav/Desktop/JCuda-All-0.3.2-bin-linux-x86_64 EnumDevices.java
than i got following error
EnumDevices.java:36: clockRate is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package
System.out.println("Clock rate: " + prop.clockRate + " MHz");
^
EnumDevices.java:37: maxThreadsPerBlock is not public in jcuda.driver.CUdevprop; cannot be accessed from outside package
System.out.println("Threads per block: " + prop.maxThreadsPerBlock);
^
2 errors
Now I'm completely confused i don't know what to do?
how to compile this program ?
how to install the jcuda package or how to use it ?
how to use package which have only jar files and .so files and the jar files don't having manifest file ?
please help me