Problems with CUDA and Matlab R2009a

Hello everybody,
I am trying to compile the well-known example provided by CUDA.

I achieved to execute:
mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
mex fft2_cuda_sp_dp.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
mex ifft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft

but I have a problem with the line:
nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart

I obtained the following error
"Undefined subroutine &main::uuidgen called at C:\Program Files\MATLAB\R2009a\bin\nvmex.pl line 728. "

I read that there were some problems with nvmel.pl and perl in old messages on the forum.

Does anyone has an idea to solve this problem?

Thank you,
Adrien

Config:
Windows XP
Matlab R2009a
Microsoft Visual C++ 2008 Express
NVIDIA Driver for Windows XP 32-bit 185.85
Matlab_CUDA_1.1

No answer for this request?

Hi amarion,

We’ve not seen this error before. We’re able to compile without problem on XP32 with R2009A. To help, there are two things that I can suggest:

  1. I’ve attached the nvmex.pl file that we’re using so that you can check to see if yours in different. We use the ones provided as-is by NVIDIA.

  2. Why are your using CUDA 1.1 toolkit? You should upgrade to 2.2 toolkit. Your driver seems to be 2.2. You should avoid having a mismatch between driver and toolkit versions.

Hope this helps!

Best,

John
nvmex.zip (21.4 KB)

I Also get the Exact Same Error:

When I Run:

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

I get the following error:

"Undefined subroutine &main::uuidgen called at C:\Program Files\MATLAB\R2009a\bin\nvmex.pl line 728. "

“??? Error using ==> nvmex at 206”

“Unable to complete sucessfully.”

And it really has no excuses now…

This is a FRESH install on

A brand new DELL Optiplex 320, 2GB Ram with Nvidia 9600GT

with the following software only and installed in this order:

  • Windows XP SP2 + Web Update to SP3

  • NVIDIA CUDA Driver 2.2 for Windows XP 32-bit 185.85

  • Microsoft Visual C++ 2005 Professional (V8.0.50727.42)

  • Cuda Toolkit 2.2 For WinXP 32-Bit

  • Cuda SDK 2.2 For WinXP 32-Bit

  • Matlab V7.8.0 (R2009a)

  • Matlab_CUDA_1.1a. (The latest version available on the Nvidia Website)

Anybody else experienced the same problems?

What can we do about it?

Hi,
Our problem is not yet solved…
Any idea??
Thank you in advance,
Adrien

I had the same problem untill use of the attached nvmex.
nvmex.zip (21.6 KB)

I had the same problem with following environment:

Hardware:
Notebook Sony VAIO SZ77
GeForce 8400M GS

Software:
Vista 32bit
CUDA driver/SDK/toolkit: 2.0 (I can’t use 2.1/2.2/2.3 because 8400M GS only support CUDA 2.0)
VC 2005 Express
MATLAB 7.8.0 (R2009a)
Matlab_CUDA_1.1 (downloaded from http://developer.nvidia.com/object/matlab_cuda.html)

I tried both nvmex.pl from sirotenko and melonakos, but still failed.

Then I tried to modify original nvmex.pl (from Matlab_CUDA_1.1) at line 728, remove the uuid code:

$main::temp_dir = mexCatdir($ENV{‘TEMP’}, tool_name() . “" . uuidgen());
=>
$main::temp_dir = mexCatdir($ENV{‘TEMP’}, tool_name() . "
” . “xxx”);

and it worked!

the command, >>tic; FS_vortex; toc;, successfully speed up from 130 sec to 60 sec in my platform.

I am having the same difficulties. I am trying to compile the examples and I get an error when I get to the cuda portion. All the mex files compile and run fine. When I run
nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
using the the original nvmex.pl file I get:

Undefined subroutine &main::uuidgen called at C:\Program Files\MATLAB\R2008b Student\bin\nvmex.pl line 728.

When I use melonako’s nvmex.pl file I get:
nvcc fatal : Unknown option ‘oC:\DOCUME~1\viktor\LOCALS~1\Temp\mex_nIoQuL\Szeta.obj’

When using sirotenko’s nvmex.pl I get;
abdelali target arch: win32
nvcc fatal : Unknown option ‘oC:\DOCUME~1\viktor\LOCALS~1\Temp\mex_YIdJOo\Szeta.obj’

C:\PROGRA~1\MATLAB\R2008B~1\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.

I also tried KSL’s suggestion of editing line 728 to $main::temp_dir = mexCatdir($ENV{‘TEMP’}, tool_name() . “_” . “xxx”);
but this gives me:
nvcc fatal : Cannot find compiler ‘cl.exe’ in PATH

C:\PROGRA~1\MATLAB\R2008B~1\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.

I am running:
i7 processor
GTX 260

Windows XP 32bit SP3
Matlab cuda 1.1a
cuda sdk 2.3
cuda driver 2.3
Matlab 7.7.0.471 (R2008b)
Microsoft Visual 2008 Express

I would be grateful if anybody could help me solve this problem.

Hi there

I also have the same problem,

Undefined subroutine &main::xxx called at C:\Archivos de programa\MATLAB\R2009b\bin\nvmex.pl line 728.
??? Error using ==> nvmex at 206
Unable to complete successfully.

nvcc fatal : Unknown option ‘oC:\DOCUME~1\YALTAS~1\CONFIG~1\Temp\mex_Iqu7CY\Szeta.obj’

C:\ARCHIV~1\MATLAB\R2009B\BIN\NVMEX.PL: Error: Compile of ‘Szeta.cu’ failed.

??? Error using ==> nvmex at 206
Unable to complete successfully.

even trying both files, but i get no solution

I’m runing:

Pentium D 2.8G
1.5RAM
8500GT

WinXP SP3 spanish
CUDA Toolkit 2.3
CUDA SDK 2.3
CUDA driver 3 beta

matlab 2009b
VS.net 2008 professional
Windows SDK 2008

I would be grateful if anybody could help me solve this problem.

For the “Unknown option” error, I found it helped to strip the ‘-’ by inserting the “name_arg = substr _,1;” at line 319 in nvmex.pl, so the section looks like below:

[codebox]

}

$name_arg = $NAME_OBJECT . smart_quote($target_name); 

$name_arg = substr $_, 1;

}

[/codebox]

Hi ,

I try to install cuda and matlab , but I have a problem and I do not know if I have the plugin for installed or if it is a error,

my error is this

mex: link of ' "fft2_cuda.mexglx"' failed.

someone can give me a manual on how to install the plugin or give me the solution of the error.