CUBLAS / CUFFT hangs in MATLAB Mex-files?

CONFIGURATION: Windows XP 32-bit; CUDA toolkit version 2.0; no GPU (emulation mode); Microsoft Visual C++ 2008 Express Edition; MATLAB R2008b.

Hi,

I am developing some GPU code using the CUBLAS and CUFFT libraries. I do most of my development on a machine that does not have CUDA-compatible hardware, so I use the CUBLAS and CUFFT emulation libraries. I am writing C code Mex-files that are called from Matlab. However, whenever I call any CUBLAS or CUFFT functions, MATLAB just hangs. This happens both in my code and in the sample MATLAB / CUDA FFT accelerator code I downloaded from the Nvidia website.

However, I was able to build my code into a standalone console application outside of MATLAB using Microsoft Visual C++ 2008 Express Edition, and it ran fine. The only thing I can think of is that the CUBLAS and CUFFT emulation libraries are causing problems with MATLAB’s memory management.

I haven’t had access to a machine with CUDA-compatible hardware, so I don’t know whether my code will run there or not.

Thanks in advance for your help,
–Chris

P.S. I am aware of Accelereyes Jacket–I have tried it and was very impressed–I was able to get my MATLAB code running on a GPU immediately. However, I am writing code that will eventually transition out of a MATLAB environment, and may need to do some development on machines that do not have GPUs installed.

I am facing EXACTLY the same issue with CUBLAS in emulation mode. I am using MATLABR2008a, VS2005 and WindowsXP 32-bit. I am also calling .cu from MATLAB using NVMEX. I cannot use Jacket. Any solutions?

Thanks,

Aditi