Problem with Matlab on OS-X

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.mexmaci
Brutal crash when trying to run a script that calls file.mexmaci.
Thanks for your help,

Finally, we’ve solved the problem by

  1. Adding -lcuda and -lcudart library in the Makefile of the Matlab plugin (quite strangely only cufft was linked),
  2. 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: It offloads Matlab computation onto the GPU, so you don’t have to fuss with memory managment, launch configurations, etc.
-James Malcolm