masaki@desktop:~/ $ cat main.cu
#include <stdio.h>
int main() {
int count = 0;
cudaError_t error;
error = cudaGetDeviceCount(&count);
printf("count = %d\nerror = %s\n", count, cudaGetErrorString(error));
return 0;
}
masaki@desktop:~/ $ /usr/local/cuda/bin/nvcc main.cu
masaki@desktop:~/ $ ./a.out
count = 0
error = unknown error