CUDA on Vista 32bit and Matlab 2011a
Hello there,

for a couple of days I am trying to compile .cu files in Matlab R2011a executing the nvmex command but unfortunately with no success. I followed all the available tutorials that I managed to find online (eg Matlab_CUDA_1.1, Tutorials & How To's With CUDA, Matlab, & Visual Studio etc) but I end up with the following error:

>> nvmex -f nvmexopts.bat Szeta.cu -IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include -LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib -lcufft -lcudart

C:\PROGRA~1\MATLAB\R2011A\BIN\NVMEX.PL: Error: 'Files\NVIDIA' not found.

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

I updated the files nvmex.pl and nvmexopts.bat that I found online for Matlab R2008a but I still get the same error. I assume that there is something wrong with these 2 files and the version of Matlab that I use.

This is very crucial for my project and although I managed to use mex command successfully for C files in Matlab, I cannot do the same for nvmex and .cu files.

I would really appreciate any suggestion or solution!

Thanks in advance,
Christos
Hello there,



for a couple of days I am trying to compile .cu files in Matlab R2011a executing the nvmex command but unfortunately with no success. I followed all the available tutorials that I managed to find online (eg Matlab_CUDA_1.1, Tutorials & How To's With CUDA, Matlab, & Visual Studio etc) but I end up with the following error:



>> nvmex -f nvmexopts.bat Szeta.cu -IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include -LC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib -lcufft -lcudart



C:\PROGRA~1\MATLAB\R2011A\BIN\NVMEX.PL: Error: 'Files\NVIDIA' not found.



??? Error using ==> nvmex at 206

Unable to complete successfully.



I updated the files nvmex.pl and nvmexopts.bat that I found online for Matlab R2008a but I still get the same error. I assume that there is something wrong with these 2 files and the version of Matlab that I use.



This is very crucial for my project and although I managed to use mex command successfully for C files in Matlab, I cannot do the same for nvmex and .cu files.



I would really appreciate any suggestion or solution!



Thanks in advance,

Christos

#1
Posted 09/26/2011 02:14 PM   
I would like also to add to my previous post that I get the same error when I am trying to use the nvmex command in the Matlab 2007a release. What should I do with this error?
I would like also to add to my previous post that I get the same error when I am trying to use the nvmex command in the Matlab 2007a release. What should I do with this error?

#2
Posted 09/27/2011 09:15 AM   
Looks like this reply is about a year late (and possibly many dollars short) but the error you're getting stems from the fact that your path names the includes (-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include) have spaces in them. The command line interprets this space as a new command line argument, not the continuation of a path. You need to wrap the path name (not the agrument flag, -I) with double quotes to ensure the [u]whole[/u] path name makes it into the include, like this:

>> nvmex -f nvmexopts.bat Szeta.cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib" -lcufft -lcudart

Unfortunately, since the install defaults to a space in the pathname, nearly every installation will have this problem.
Looks like this reply is about a year late (and possibly many dollars short) but the error you're getting stems from the fact that your path names the includes (-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include) have spaces in them. The command line interprets this space as a new command line argument, not the continuation of a path. You need to wrap the path name (not the agrument flag, -I) with double quotes to ensure the whole path name makes it into the include, like this:



>> nvmex -f nvmexopts.bat Szeta.cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\lib" -lcufft -lcudart



Unfortunately, since the install defaults to a space in the pathname, nearly every installation will have this problem.

#3
Posted 04/04/2012 07:37 PM   
Scroll To Top