I tried to use the tutorial files downloaded from nvidia. When I use mex, it’s ok. But when I use nvmex, it failed.
Matlab displayed :
nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
Undefined subroutine &main::uuidgen called at C:\matlab\bin\nvmex.pl line 728.
??? Error using ==> nvmex at 206
Unable to complete successfully.
For what it’s worth, I’m having the exact same problem. To add to the original poster’s question, the problem arises when following the steps listed below:
Can I ask what compiler and Matlab version you used to be able to compile the examples with regular mex?
I use VS 2008 and Matlab 2008a (& 2009a) and I get Errors like:
mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
fft2_cuda.c
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(49) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(50) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(62) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(63) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(79) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(80) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(97) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(98) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(110) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(111) : error C2088: ‘[’ : illegal for struct
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(154) : warning C4244: ‘=’ : conversion from ‘double’ to ‘int’, possible loss of data
C:\Project\CUDA\Matlab CUDA plugin\fft2_cuda.c(155) : warning C4244: ‘=’ : conversion from ‘double’ to ‘int’, possible loss of data
C:\PROGRA~1\MATLAB\R2008A\BIN\MEX.PL: Error: Compile of ‘fft2_cuda.c’ failed.