I implemented two separate programs using JCuda, and i want to execute them simultaneously (in separate CPU threads). I thought the easiest way is to run them on separate GPUs, so i added another device to my machine ( first it was GeForce GTX 760 with Compute Capability 3.0, like the first one, but the two get very hot since they’re close to each other ) so i changed the second with another one less powerful (GeForce 210 with Compute Capability 1.2). is this enough to run a program in JCuda 6.5 ?
When I run my first program on the second device I get this exception : jcuda.CudaException: CUDA_ERROR_NO_BINARY_FOR_GPU
JCuda does not have any particular requiremens for the GPU. It is just a very thin wrapper around CUDA. So: If it supports CUDA, it should also support JCuda.
About the “jcuda.CudaException: CUDA_ERROR_NO_BINARY_FOR_GPU”: This sounds like you created a CUBIN or PTX file and tried to load it. Note that (particularly) CUBIN files and (to a lesser extent) PTX files may be specific for the target hardware - namely, for the Compute Capability. So you might have to handle this by creating two PTX files, ROUGHLY like this nvcc -ptx -arch=sm_12 YourKernel.cu -o YourKernel_12.cu nvcc -ptx -arch=sm_30 YourKernel.cu -o YourKernel_30.cu
and load the appropriate file for the respective device. Depending on your goals, this could be solved “pragmatically”, by a program parameter, or in a more sophisticated way, e.g. by querying the Compute Capability at runtime…
I recompiled with -arch=sm_12, but it doesn’t seem to recognize the functions “printf” and “__longlong_as_double”. Is this due to compute capability ?
I also would like to know how to query the compute capability at runtime.