CUDA compilation fails nvcc compiler

Hi,

When I try compiling the cuda code (.cu) with nvcc (with visual studio 2008), it fails i.e. produces no results. The commands executes as a dummy statement and exits. It was working fine till recently. When I checked, all the environments have been set properly. I even tried the command line option and getting the same results, any hep is appreciated, thank you

The command below just exits

nvcc -m32 -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -D_DEBUG -D_WIN32 -I"D:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -maxrregcount=32 -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_
20,compute_20” --compile -o “Debug\test1.cu.obj” test1.cu

What are you getting in response? check the output pane in studio…

eyal

What are you getting in response? check the output pane in studio…

eyal

Thamk you for your response.

I get the following message in the output window

Compiling with CUDA Build Rule…

“D:\CUDA\bin\nvcc.exe” --keep -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -I"D:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd /GR " -maxrregcount=32 --ptxas-options=-v -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_20,compute_20” --compile -o “Debug\test1.cu.obj” “d:\CUDA\SDK\C\src\test2\test1.cu”

Linking…

LINK : fatal error LNK1181: cannot open input file ‘.\Debug\test1.cu.obj’

Build log was saved at “file://d:\CUDA\SDK\C\src\test2\Debug\BuildLog.htm”

test2 - 1 error(s), 0 warning(s)

Thamk you for your response.

I get the following message in the output window

Compiling with CUDA Build Rule…

“D:\CUDA\bin\nvcc.exe” --keep -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -I"D:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd /GR " -maxrregcount=32 --ptxas-options=-v -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_20,compute_20” --compile -o “Debug\test1.cu.obj” “d:\CUDA\SDK\C\src\test2\test1.cu”

Linking…

LINK : fatal error LNK1181: cannot open input file ‘.\Debug\test1.cu.obj’

Build log was saved at “file://d:\CUDA\SDK\C\src\test2\Debug\BuildLog.htm”

test2 - 1 error(s), 0 warning(s)

You should probably look higher in the error log - seems like the .cu file didnt compile due to a compilation error and therefore no test1.cu.obj file was

created…

eyal

You should probably look higher in the error log - seems like the .cu file didnt compile due to a compilation error and therefore no test1.cu.obj file was

created…

eyal

I re-checked, the cuda file (test2.cu) did exist and was taken for compiation (atleast according to the logs) but was ignored. Here is the log that was output from the visual studio

Deleting intermediate and output files for project ‘test2’, configuration ‘Debug|Win32’

Compiling…

testapp1.c

Note: including windows.h

Note: including math.h

Note: including assert.h

Note: including rendercheckGL.h

Note: including

Note: including

Note: including

Note: including GL/glew.h

Note: including GL/glut.h

Note: including lib: glut32.lib

d:\cuda\sdk\c\src\test2\testapp1.c(57) : warning C4101: ‘h_sad’ : unreferenced local variable

Compiling with CUDA Build Rule…

“D:\CUDA\bin\nvcc.exe” --keep -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -I"D:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd /GR " -maxrregcount=32 --ptxas-options=-v -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_20,compute_20” --compile -o “Debug\test1.cu.obj” “d:\CUDA\SDK\C\src\test2\test1.cu”

Linking…

testapp1.obj : warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/INCREMENTAL:NO’ specification

LINK : fatal error LNK1181: cannot open input file ‘.\Debug\test1.cu.obj’

Build log was saved at “file://d:\CUDA\SDK\C\src\test2\Debug\BuildLog.htm”

test2 - 1 error(s), 2 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I re-checked, the cuda file (test2.cu) did exist and was taken for compiation (atleast according to the logs) but was ignored. Here is the log that was output from the visual studio

Deleting intermediate and output files for project ‘test2’, configuration ‘Debug|Win32’

Compiling…

testapp1.c

Note: including windows.h

Note: including math.h

Note: including assert.h

Note: including rendercheckGL.h

Note: including

Note: including

Note: including

Note: including GL/glew.h

Note: including GL/glut.h

Note: including lib: glut32.lib

d:\cuda\sdk\c\src\test2\testapp1.c(57) : warning C4101: ‘h_sad’ : unreferenced local variable

Compiling with CUDA Build Rule…

“D:\CUDA\bin\nvcc.exe” --keep -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -I"D:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd /GR " -maxrregcount=32 --ptxas-options=-v -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_20,compute_20” --compile -o “Debug\test1.cu.obj” “d:\CUDA\SDK\C\src\test2\test1.cu”

Linking…

testapp1.obj : warning LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/INCREMENTAL:NO’ specification

LINK : fatal error LNK1181: cannot open input file ‘.\Debug\test1.cu.obj’

Build log was saved at “file://d:\CUDA\SDK\C\src\test2\Debug\BuildLog.htm”

test2 - 1 error(s), 2 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

If it was ignored and not compiled that would explain the error :)
Check why it wasn’t compiled. Maybe you’ve excluded it from the build process or the rules for CUDA have been disabled…

If it was ignored and not compiled that would explain the error :)
Check why it wasn’t compiled. Maybe you’ve excluded it from the build process or the rules for CUDA have been disabled…

It is getting ignored, the reason is unclear to me. I tried to use command line to execute sample code, I see that it just ignores the file and comes out as shown below

nvcc test2.cu

I also tried to create another workspace for the same but of no avail, I find the same behavior when I try to compile the samples given with the SDK

It is getting ignored, the reason is unclear to me. I tried to use command line to execute sample code, I see that it just ignores the file and comes out as shown below

nvcc test2.cu

I also tried to create another workspace for the same but of no avail, I find the same behavior when I try to compile the samples given with the SDK