compile on matlab failed

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.

Did anyone meet this problem?

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:

    Download MATLAB CUDA for Windows (1.1a) from http://developer.nvidia.com/object/matlab_cuda.html

    Follow the instructions in the README.txt file

    The line that causes the problem is the first after " ---- Compile the CUDA source and rerun the simulations with acceleration ----":

    nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart

Anybody else out there have a solution?

Hi,

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.

Cheers,
Patrik

removing “uuidgen” (it is called to create a temp folder name) in nvmex.pl can solve this problem.

you can find details in below thread:
http://forums.nvidia.com/index.php?showtopic=100998

Thanks for the info! It worked!