At first when I typed “nvcc test.cu” it couldn’t find cl.exe so I edited nvcc.profile and added the path there.I couldn’t get it working so I event copied whole content of C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin to nvcc’s existing folder but no luck again.
C:\CUDA\bin>nvcc ma.cu
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 8.0 and MSVC 9
.0 are supported
nvcc fatal : A single input file is required for a non-link phase when an outp
utfile is specified
Ok, so for nothing special it’s all disgussed here (however I can’t still get it working External Image ).
But the thing is when I open NVIDIA GPU Computing SDK Browser and run examples it works perfectly.I modify the codes and run through SDK Browser without a problem.Finally I concluded that there is nothing wrong with the system and tools installed and there is nothing wrong with the nvcc.I read posts about running from Windows SDK’s 64-bit cmd prompt but again no luck with that.
If the SDK browser can run examples, I must be able to run them too! External Image
The cl.exe in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin is a 32 bit compiler.
The cl.exe in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\x86_amd64 is a cross platform compiler which could be used to compile for 64 bit but is rejected by nvcc
The cl.exe in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64 is the one we want but nvcc rejects it.
Currently I can not find a way around this bug un nvcc which [from reading the forums] has been around for a very long time
I installed VS 2008 Professional, CUDA 2.3 toolkits, 2.3 device drivers and CUDA SDK 2.3 on Windows 7 64 bit with Quadro FX 770m. I have no probelm to compile .cu and run its exe. Download tha zip file and put into in a folder “matMul_s” located at “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\MatMul_s”; I assume VS2008 and CUDA 2.3 toolkit and SDK are installed in default location as I did.
In a command prompt:
make sure c:\cuda\bin64 is in your system path; (It should be if you installed cuda 2.3 toolkit properly);
go to “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64”; run “vcvarsamd64.bat” which will set up your proper environment variables for your 64 bit VC;
go to your project file folder, type compil_s.bat or try:
nvcc -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” -o matMul.exe matMul.cu -IC:\cuda\include -I…..\common\inc -L…..\common\lib -LC:\cuda\lib64 -lcufft -lcudart -lcutil64
it should compile and link and create output matMul.exe for matMul.cu.
I did exactly as you suggested, my problem is that my prompt tells me this after i executed compile_s.bat:
The Order “cl” was either written wrong or could not be found
what should i do?
Regards
maz
EDIT: It seems like VS2008 is compiling by default only in 32 bit mode, thats why it cannot find the 64 bit version of cl.exe
If i managed to get my VS 2008 working with 64bit compiler , and the problem still persists ill ask again here