I'm using a GeForce 9800 GX2. I installed drivers and the CUDA SDK i wrote simple program which look s like this:
__global__ void myKernel(int *d_a) { int tx=threadIdx.x; d_a[tx]+=1; cuPrintf("Hello, world from the device!\n"); } int main() { int *a=(int*)malloc(sizeof(int)*10); int *d_a; int i; for(i=0;i<10;i++) a[i]=i; cudaPrintfInit(); cudaMalloc((void**)&d_a,10*sizeof(int)); cudaMemcpy(d_a,a,10*sizeof(int),cudaMemcpyHostToDevice); myKernel<<<1,10>>>(d_a); cudaPrintfDisplay(stdout, true); cudaMemcpy(a,d_a,10*sizeof(int),cudaMemcpyDeviceToHost); cudaPrintfEnd(); cudaFree(d_a); } The code is compiling properly, but the kernel appear not to be launching... No message is printed from the kernel side. What should I do to resolve this?
no CUDA-capable device is detected in simple_device_call.cu at line 30...i'm using linux and SDL sample code is also not working