Compiling Dynamic parallelism error

Hi,

I am trying to run an algorithm using dynamic parallelism. The code is working just fine without using the DP whoever, once I tried to run it using DP the following errors appear :-

Error 43 error : Undefined reference to ‘cudaStreamCreateWithFlags’ in ‘Debug/kernel.cu.obj’ C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\CudaNegamaxDP\nvlink CudaNegamaxDP
Error 44 error : Undefined reference to ‘cudaGetParameterBuffer’ in ‘Debug/kernel.cu.obj’ C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\CudaNegamaxDP\nvlink CudaNegamaxDP
Error 45 error : Undefined reference to ‘cudaLaunchDevice’ in ‘Debug/kernel.cu.obj’ C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\CudaNegamaxDP\nvlink CudaNegamaxDP
Error 46 error : Undefined reference to ‘cudaStreamDestroy’ in ‘Debug/kernel.cu.obj’ C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\CudaNegamaxDP\nvlink CudaNegamaxDP
Error 47 error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe” -dlink -o Debug\CudaNegamaxDP.device-link.obj -Xcompiler “/EHsc /W3 /nologo /Od /Zi /RTC1 /MTd " -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\lib\Win32” cudart.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -gencode=arch=compute_35,code=sm_35 -G --machine 32 Debug\kernel.cu.obj” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 5.5.targets 668 9 CudaNegamaxDP

I configured the environment like this:

  1. View -> Property Pages
  2. Configuration Properties -> CUDA C/C++ -> Common -> Generate Relocatable Device Code -> Yes (-rdc=true)
  3. Configuration Properties -> CUDA C/C++ -> Code Generation -> compute_35,sm_35

if I modified the configuration with the following :-
4) Configuration Properties -> Linker -> Input -> Additional Dependencies -> cudadevrt.lib

a different error appears :-

Error 43 error LNK2001: unresolved external symbol ___fatbinwrap_54_tmpxft_00000eb0_00000000_8_cuda_device_runtime_cpp1_ii_5f6993ef C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\CudaNegamaxDP\CudaNegamaxDP.device-link.obj CudaNegamaxDP
Error 44 error LNK1120: 1 unresolved externals C:\Users\AHMED\documents\visual studio 2012\Projects\CudaNegaMaxClass\Debug\CudaNegamaxDP.exe 1 1 CudaNegamaxDP

I am using the latest Cuda version 5.5.20 under VS 2012.

Any idea how I can fix it ?

I really need your help urgently.

Thank you so much.

Thank you I just found the solution here :-

http://stackoverflow.com/questions/2061715/unresolved-external-symbols-in-beginners-cuda-program