We’ve downloaded the CUDA Matlab plug-in for UNIX.
We set the correct path for Matlab on OS-X (/Applications/MATLAB_2007b).
We compiled form Matlab with: unix(‘make’)
Compilation is OK (One warning about dublicate library libz.1.dylib).
file.cu -> file.mexmaci
Brutal crash when trying to run a script that calls file.mexmaci.
Thanks for your help,
Finally, we’ve solved the problem by
- Adding -lcuda and -lcudart library in the Makefile of the Matlab plugin (quite strangely only cufft was linked),
- Using debug mode “-g”.
Even when linking with cuda and cudart, the compilation with optimization makes matlab crash.
If you’re trying to interface with a lot of Matlab–not just the FFT–then you might want to take a look at a project I’m involved in: www.accelereyes.com. It offloads Matlab computation onto the GPU, so you don’t have to fuss with memory managment, launch configurations, etc.