D𝜋 recommends the following compiler flags to run the code on a GPU.
$ nvcc -ccbin g++ -I./cuda/NVIDIA_CUDA-9.2_Samples/common/inc -I/usr/local/cuda-9.2/targets/x86_64-linux/include -m64 -Xcompiler -fno-stack-protector -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 -rdc=true -O2 sonn.o -c sonn.c $ nvcc -ccbin g++ -m64 -Xcompiler -fno-stack-protector -gencode arch=compute_61,code=sm_61 -gencode arch=compute_61,code=compute_61 -o sonn sonn.o -lcuda
If you’re using CUDA version 10.1 instead of 9.2 then you will have to rename sonn.c to sonn.cu.
sonn.c
sonn.cu
D𝜋 recommends the following compiler flags to run the code on a GPU.
If you’re using CUDA version 10.1 instead of 9.2 then you will have to rename
sonn.c
tosonn.cu
.