Installed CUDA 10.1 successfully on RHEL 7.9 with Quadro K2200 GPU and compiled/ran the following program using CLion/CMake, which only output result from CPU, not GPU. Does anyone know why CUDA is unable to reach the GPU? Thanks.
global void cuda_hello(){
printf(“Hello World from GPU!\n”);
}
int main() {
std::cout << “CPU hello world!” << std::endl;
cuda_hello<<<1,1>>>();
cudaDeviceSynchronize();
system(“read -p ‘Press Enter to continue…’ var”);
return 0;
}
//Output:
//CPU hello world!
//Press Enter to continue…
//Process finished with exit code 0