I am using Geforce 210 as GPGPU device. When I run the following code, sometimes it incurs the error like “no CUDA-capable device is available”. When I reboot the computer, the problem is gone. But this does not mean the problem is gone forever. It will make appearance somewhat in a random sense. I don’t know why. Please give me some hint. I am using Ubuntu 9.10. Cheers.
------------------------------------- the code excerption--------------------------------------------------------------------
…
int gpu_idx = 0; // Only one GPU is availabe on the system.
struct cudaDeviceProp prop;
cudaGetDeviceProperties(&prop, device);
display_device_info(&prop); // Never reports error here.
PRINTF("---Start to Set Device---\n");
cudaSetDevice(device);
cudaThreadSynchronize();
cudaError_t cuda_err;
if ((cuda_err = cudaGetLastError()) != cudaSuccess) {
printf("ERROR: CUDA error: %s\n", cudaGetErrorString(cuda_err)); // this line reports the mentioned error randomly.
exit(cuda_err);
}
...