That what I’ve got trying to compile sample Szeta.cu in Mathlab with CUDA using nvcc.
nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
C:\PROGRA~1\MATLAB\R2008B\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.
Obviously nvcc does not like my Microsoft Visual C compiler. I tried Microsoft Visual C++ compiler version 6.0 , but the same error I have with Microsoft Visual C++ compiler version 9.0.
I changed path in nvmexopts.bat from
set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 8.0
to
set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
otherwice it doesn’t find any cl.exe at all.
Is there any other option to make it work except installing Microsoft Visual Studio 8.0?
Thank you.
use 2.1, it adds support for VS2008 (MSVC 9).
Thank you! That helped. But still I got the following
nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
Szeta.cu
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(174): here; dllimport/dllexport dropped
tmpxft_00000a3c_00000000-3_Szeta.cudafe1.gpu
tmpxft_00000a3c_00000000-8_Szeta.cudafe2.gpu
c:\cuda\include\common_functions.h(56): warning: dllexport/dllimport conflict with “clock”
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(174): here; dllimport/dllexport dropped
tmpxft_00000a3c_00000000-3_Szeta.cudafe1.cpp
cl : Command line warning D9025 : overriding ‘/EHc-’ with ‘/EHc’
‘mt’ is not recognized as an internal or external command,
operable program or batch file.
tic; FS_2Dturb(128,1,1,1); toc;
??? Invalid MEX-file ‘F:\RDE\Matlab_CUDA_1.1\Szeta.mexw32’: The specified module could not be found.
.
Error in ==> FS_2Dturb at 89
d1 = dt*Szeta(zeta,k,nu4);
Why Szeta.mexw32 is invalid?
Thanks