I'm trying to link my CUDA Kepler's Dynamic Parallelism program as follows:
nvcc -m32 -arch=sm_35 -dc -Xcompiler '-fPIC' DFS_Solving.cu
nvcc -m32 -arch=sm_35 -Xcompiler '-fPIC' -dlink DFS_Solving.o -o link.o
gcc -shared -Wl,-soname,libdfs.so -o libdfs.so DFS_Solving.o link.o -L/usr/local/cuda/lib -lcudart
gcc -c proxy.c
gcc -o proxy proxy.o -L. -ldfs
And I aways get the following error:
./libdfs.so: undefined reference to `__fatbinwrap_66_tmpxft_000015c6_00000000_12_cuda_device_runtime_compute_50_cpp1_ii_5f6993ef'
collect2: error: ld returned 1 exit status
But: when I do the same procedure to compile a CUDA code with no Dynamic Parellelism, the program works.
Does anybody knows what can I do in order to make this compilation works?
-lcudadevrt
anywhere that I can see. Dynamic Parallelism has special compilation requirements. You might want to look at a makefile in a cuda dynamic parallelism sample code. SO expects that you provide a complete MCVE, not just your compilation steps. – Robert Crovella