Cuda error MSB3721 exited with code 2

compiler-errorscudavisual studio 2010

I am trying to compile my first CUDA 5.0 project I took the template sample. I have not gotten it to compile it yet and as it shows two errors, I have compared the project settings with those of the template project and they appear to be consistent so I'm stumped. Here are my two errors.

The first occurs when I try to call my kernwl it marks the '<<<'

Error 32 error : expected an expression D:\Virtualbox
Data\Assembla\gul\antares
software\AntaresVisualizerCuda\AntaresVisualizerCuda\kernel.cu 584

Its possible that thar would be fixed by solving the next error:

Error 33 error MSB3721: The command ""C:\Program Files\NVIDIA GPU
Computing Toolkit\CUDA\v5.0\bin\nvcc.exe"
-gencode=arch=compute_10,code=\"sm_10,compute_10\" –use-local-env –cl-version 2010 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin" -I"./" -I"C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v5.0\C\common\inc" -I"C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v5.0\shared\inc" -I"C:\fltk-1.3.0\include" -I"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -I"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include" -G –keep-dir
"Debug" -maxrregcount=0 –machine 32 –compile -g -DWIN32 -DWIN32
-DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MTd " -o "Win32/Debug/kernel.cu.obj"
"D:\Virtualbox Data\Assembla\gul\antares
software\AntaresVisualizerCuda\AntaresVisualizerCuda\kernel.cu""
exited with code 2. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA
5.0.targets 498

Any ideas on this one?

Best Answer

Your kernel call within the comments looks like this:

tracePixel<<< gridP, threads >>>(d_screenOrigin, u_unit, d_u_dir, v_unit, d_v_dir, d_cam_pos, d_minpoint, d_maxpoint, gridLength, min, scale, d_grid, d_buffer,);

If that is indeed what you have and not a typo, then there is an extra ',' after d_buffer which should not be there. Either that or you're missing an argument.

Related Topic