Dear all:
I install cuda 2.2 and test exmaple “matrixMul” on VC2005.
I use CUDA VS2005 Wizard provided by kyzhao to setup project manager.
error message is
1>Deleting intermediate and output files for project ‘matrixMul’, configuration ‘Debug|x64’
1>Compiling…
1>nvcc fatal : Value of -arch option (‘sm_13’) must be a virtual code architecture
1>Compiling…
1>nvcc fatal : Value of -arch option (‘sm_13’) must be a virtual code architecture
1>Compiling…
project setting is
property → CUDA → Command Line
C:\CUDA_64\bin\nvcc.exe -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” -I"C:\CUDA_64\include" -I"C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc" -O0 -D_DEBUG -D_CONSOLE -arch sm_13 -code sm_13 --host-compilation C++ -g -c -m 64 -o “x64\Debug\matrixMul.obj” -odir “x64\Debug” -ext none -int real matrixMul.vcproj
copy C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\Cuda.Rules
to C:\Program Files (x86)\Microsoft Visual Studio 8\VC\VCProjectDefaults
and modify Cuda.Rules to add “include directory”
<Properties>
<StringProperty
Name="Include"
DisplayName="Additional Include Directories"
Description="Specifies one or more directories to add to the include path; use semi-colon delimited list if more than one. (/I[path])"
Switch="-I"[value]""
DefaultValue="$(CUDA_INC_PATH);$(NVSDKCUDA_ROOT)\common\inc"
Inheritable="false"
Delimited="true"
Delimiters=";"
/>
create VC project as usual (NOT from CUDA wizard)
project → add existing Item
add matrixMul.cu
then pop up a dialog “Matching Custom Build Rules”
there are three choices in my system,
one comes from C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\Cuda.Rules, named CUDA Build Rule
other two are created by kyzhao
I choose “CUDA Build Rule”
in configuration property, one property “CUDA Build Rule v2.2.0” appears
GPU Architecture → sm_13
change platform to x64
set proper library and its path
Linker → Input → addtional dependence
add “C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\common\lib\cutil64D.lib”