1>Performing Custom Build Step
1>nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
1>Compiling…
1>stdafx.cpp
1>Compiling…
do not work with vista 64bit?
i use MSVC 8.0
1>Performing Custom Build Step
1>nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
1>Compiling…
1>stdafx.cpp
1>Compiling…
do not work with vista 64bit?
i use MSVC 8.0
Don’t use the VS x64 command prompt; use the standard command prompt (it should still build 64-bit executables if you pass -m64 to nvcc).
Can you explain why is designed this way? It is very inconvenient when one wants to compile cpp files with the 64-bit cl in the same environment as 64-bit cu files with nvcc that will eventually be linked together. The hacked workaround I have (which is the same used in the SDK sample projects btw) is to specify the 32-bit cl.exe directory to -ccbin on the nvcc command line.
There shouldn’t be any reason I see to prevent nvcc from using the 64-bit cl.exe from the 64-bit environment. After all, if you enable the verbose option when using nvcc from the 32-bit environment you see that it uses the 64-bit cl.exe!
I’ve already got a bug on this in the bug tracker, but there haven’t been any updates since the issue was confirmed (not that I was expecting an update, since they usually aren’t updated until the fix is ready to test in the latest beta)
Hi, could you explain your workaround to the error?
I also get:
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
when I try to compile, although I am compiling a CUDA MEX file using nvmex from the MATLAB prompt. I’m also using 64 bit vista and already have MSVC 8.0 Professional Edition installed.
Use nvcc -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” rest_of_nvcc_arguments
Replace the directory specified with the one where the 32-bit cl.exe is. Also be sure to install VS2005 SP1.
Thanks a lot, It works!
Hi,
Ive been using
set PATH=%VCINSTALLDIR%\BIN\AMD64;
in my nvmexopts.bat. If I try to invoke
nvmex -v -f nvmexopts.bat Szeta.cu -lcufft -lcudart
then I get
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
When the trailing amd64 from the %VCINSTALLDIR% variable is removed it seems to be everything configured properly but during the compilation I get:
D:\PROGRA~1\MATLAB\R2008A\BIN\NVMEX.PL: Error: Compile of 'Szeta.cu' failed.
The whole process when increased verbosity:
>> nvmex -v -f nvmexopts.bat Szeta.cu -lcufft -lcudart
This is mex, Copyright 1984-2007 The MathWorks, Inc.
Warning: cufft specified with -l option not found on -L path
Warning: cudart specified with -l option not found on -L path
-> Options file specified on command line
----------------------------------------------------------------
-> Options file = nvmexopts.bat
MATLAB = D:\PROGRA~1\MATLAB\R2008a
-> COMPILER = nvcc
-> Compiler flags:
COMPFLAGS = -c -Xcompiler "/c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD"
OPTIMFLAGS = -Xcompiler "/O2 /Oy- /DNDEBUG"
DEBUGFLAGS = -Xcompiler "/Zi /Fd"Szeta.mexw64.pdb""
arguments =
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = /dll /export:mexFunction /MAP /LIBPATH:"D:\PROGRA~1\MATLAB\R2008a\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /implib:D:\tmp\Elviin\mex_SAJZVW\templib.x /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
LINKDEBUGFLAGS = /DEBUG /PDB:"Szeta.mexw64.pdb"
LINKFLAGSPOST =
Name directive = /out:"Szeta.mexw64"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo "mexversion.res"
-> Resource Linker =
----------------------------------------------------------------
--> nvcc -c -Xcompiler "/c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD" /FoD:\tmp\Elviin\mex_SAJZVW\Szeta.obj -ID:\PROGRA~1\MATLAB\R2008a\extern\include -ID:\PROGRA~1\MATLAB\R2008a\simulink\include -Xcompiler "/O2 /Oy- /DNDEBUG" -DMX_COMPAT_32 "D:\Program Files\MATLAB\R2008a\toolbox\cuda\Szeta.cu"
Szeta.cu
d:\dev\tool\nvidia\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with "clock"
D:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN/..\INCLUDE\time.h(176): here; dllimport/dllexport dropped
tmpxft_00001408_00000000-3_Szeta.cudafe1.gpu
tmpxft_00001408_00000000-8_Szeta.cudafe2.gpu
d:\dev\tool\nvidia\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with "clock"
D:\Program Files (x86)\Microsoft Visual Studio 8\VC\BIN/..\INCLUDE\time.h(176): here; dllimport/dllexport dropped
tmpxft_00001408_00000000-3_Szeta.cudafe1.cpp
tmpxft_00001408_00000000-12_Szeta.ii
D:/Program Files/MATLAB/R2008a/toolbox/cuda/Szeta.cu(314) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:/Program Files/MATLAB/R2008a/toolbox/cuda/Szeta.cu(315) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
D:\PROGRA~1\MATLAB\R2008A\BIN\NVMEX.PL: Error: Compile of 'Szeta.cu' failed.
??? Error using ==> nvmex at 206
Unable to complete successfully.
Instead of using
set PATH=%VCINSTALLDIR%\BIN\AMD64;
in your nvmexopts.bat file, try and add the -ccbin to COMPFLAGS in nvmexopts. Ex:
set COMPFLAGS=-ccbin "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin" -c -D_WCHAR_T_DEFINED -Xcompiler "/c /Zp8 /GR /W3 /EHsc- /Zc:wchar_t- /DMATLAB_MEX_FILE /nologo"
If this doesn’t work and you are just trying to compile a CUDA mex file with a 64bit OS and MATLAB R2008a check out
http://forums.nvidia.com/index.php?showtop…ndpost&p=421673
You will have to replace the nvmex.pl file in matlab’s bin directory.
Hi, I have Microsoft visual C++ 2008 express edition installed and i get a very similar error. I am using cmd to run nvcc to compile a C++ source file. (toolkit version 2.2, I’m using a laptop)
When i enter that command into cmd it returns:
“The compiler specified via option --compiler-bindir '“C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” does not exist”
Should I install another version of Visual c?