This project is read-only.

CUDA Compilation error in Cudafy Viewer

Dec 15, 2013 at 5:19 PM
Edited Dec 15, 2013 at 5:20 PM
Hi,

I get the following error when click the Run CUDA test button:

Platform=x86
Checking for CUDA SDK at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc
CUDA SDK Version=5.5
Attempting to cudafy a kernel function.
Successfully translated to CUDA C.
Attempting to compile CUDA C code.
Compilation error: nvcc : fatal error : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2008, 2010, and 2012 are supported
.

I have VS 2010 Ultimate installed.

My Check for CUDA returns:

Found 1 devices.

Name: GeForce GTX 660
Compute capability: 3.0

OpenCL tests go through just fine.

I get the same error when running example scripts.

I have tried to include this line
compiler-bindir = C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
in
C:\CUDA\bin64\nvcc.profile

as well as I specified IncludeDirectoryPath in CompileProperties object.
Doesn't help.

Could you suggest anything to avoid this error in Cudafy Viewer as well as in example scripts?
Dec 17, 2013 at 6:15 AM
There are a number of discussions on this forum about this. You can certainly try checking your path in Environment Variables. Can also be too long, common if you have added many SDKs such as OpenCL. You may need to reboot.
Also make sure that a CUDA example works fine before trying CUDAfy.
Dec 17, 2013 at 6:59 AM
Nick, thank you for your reply.

Yes, I checked my PATH and it contains the right path to my VS bin. Reinstalled CUDA and rebooted several times too. Sorry that I forgot to mention this.

CUDA example breaks with 222 errors, that is 111 pairs of the same messages:

error C1083: =х єфрхЄё  юЄъЁvЄ№ Їрщы шёЄюўэшъ: ;: No such file or directory File: c1xx

error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -gencode=arch=compute_11,code=\"sm_11,compute_11\" -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env --cl-version 2010 -ccbin "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I..\common\UtilNPP -I..\common\FreeImage\include -I....\common\inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -G -maxrregcount=0 --machine 32 --compile -cudart static -Xcompiler "/wd 4819" -g -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_MBCS -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o .\Win32\GrabcutGMM.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\7_CUDALibraries\grabcutNPP\GrabcutGMM.cu"" exited with code 2.

The garbage in the first error message puzzles me. Could you help with any ideas?
Dec 17, 2013 at 7:13 AM
You don't have Russian OS or language packs do you...?
Dec 17, 2013 at 7:43 AM
I do have Russian OS and language packs, but that garbage is not Russian, despite that some characters are cyrillic. Also, it is not Bulgarian, Ukrainian or any other cyrillic language.
Dec 17, 2013 at 7:37 PM
Nick, I resolved all my problems. Here is how, in case it may be of interest for others.

First, I reinstalled CUDA to C:\CUDA.
The original (default) location was C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5.
That weird error with garbage characters disappeared.
I have no idea why didn't it like it's own default path, but it worked.
It wasn't just because of re-installation, because I tried to re-install it in the default location before.
The path was the key.

After that, the same error appeared in CUDA example as in Cudafy Viewer:
nvcc : fatal error : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2008, 2010, and 2012 are supported.
It disappeared after I reinstalled Visual Studio (in the same default location).

Now everything works fine. Thank you for your support.