CUDA with Matlab - nvmex has compile errors on system files

I downloaded and after putting my Visual Studio 2008 cl.exe and the NVIDIA nvcc on the DOS path, I can get the compilation started.

I tried compiling the example they provide. The mex compilation works fine. But with nvmex after a while it quits with a huge bunch of errors.

Here are the first few lines.

Any help appreciated.

BTW, I am using Windows XP, 32 bit, SP2 and Visual Studio 2008 Express

nvmex -f nvmexopts.bat -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart
cl : Command line warning D9025 : overriding ‘/EHc-’ with ‘/EHc’
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(235) : error C2065: ‘_Buffer’ : undeclared identifier
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\time.h(235) : error C3861: ‘wchar_t’: identifier not found

… 100 more lines of errors

You might want to take a look at the Jacket SDK, As a shameless plug, I’ll mention that with the Jacket SDK, you can avoid messing with these compilation issues and can also inherit Jacket’s big library of functions, memory manager, and JIT compiler.

Good luck in whatever you end up doing!

I am doing a Monte Carlo simulation that requires ‘if’ conditions in the parallel computations. Last I looked your ‘parfor’ style block did not allow that. Has that changed with your recent releases?

Hi Bob–

Correct, we do not currently support if-statements within gfor-blocks. However, we have been incubating a new critical-section compiler. See our post here:

It allows users to annotate critical sections of arithmetic so that the compiler can see the whole code segment to make compilation decisions. Let us know if you want to be included in the beta group for early access.

James Malcolm (