Matlab + Cuda 2.0 problems I can't compile example

Hi, I know there are similar topics to this problem, but the errormessage that I get is different to others.

My System:
Vista 32bit
Cuda 2.0
MS Visual Professional 2005
Matlab 2007b
Cuda Driver is called “NVIDIADisplayWinVista(178_08)Int.exe”
I have a 8800 GTX

This says the manual:


---- Compile and test the CUFFT interface ----

dir

. FS_vortex.m bin nvmex.m
… README.txt fft2_cuda.c nvmex_helper.m
FS_2Dflow.pdf Szeta.cu fft2_cuda_sp_dp.c nvmexopts.bat
FS_2Dturb.m Szeta.m ifft2_cuda.c speed_fft.m

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
dir

. README.txt fft2_cuda.mexw32 nvmex.m
… Szeta.cu fft2_cuda_sp_dp.c nvmex_helper.m
FS_2Dflow.pdf Szeta.m fft2_cuda_sp_dp.mexw32 nvmexopts.bat
FS_2Dturb.m bin ifft2_cuda.c speed_fft.m
FS_vortex.m fft2_cuda.c ifft2_cuda.mexw32

speed_fft


I have all these files installed and it is in the path-folder. Then I try the first command:

mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft

Then I get this:


mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
Writing library for fft2_cuda.mexw32
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cudaMalloc@8’
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cudaMemcpy@16’
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cufftPlan2d@16’
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cufftExecC2C@16’
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cufftDestroy@4’
c:\users\alexan~1\appdata\local\temp\mex_c5af1e81-c117-4f32-9e80-fe0c7093dcf5\fft2_cuda.obj .text: undefined reference to ‘_cudaFree@4’

E:\PROGRA~2\MATLAB\R2007A\BIN\MEX.PL: Error: Link of ‘fft2_cuda.mexw32’ failed.

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

For the other both compiler-commands

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

I get similar messages. When I start

speed_fft

Matlab brakes down. It closes without message.

The only idea that I still have is to install XP 32bit. But does that really help?
Hm, I really need to get that running, I hope someone can help me…

grettings

Alexander

Hi, it works now. I didn’t choose the compiler VS 2005 in matlab. After typing

mex -setup

it all works well now.

This topic can be closed. :-)

sorry, i have the same problem…what have you choosen?

He chose the VS2005 compiler.

thanks…i’m sorry but i’ve not read correctly
did VS2008 work correctly with cuda 2.0 and mtlab 2008?

VS2008 is as far as I know only supported from CUDA 2.1