Mex works under Linux but not Windows

I am facing a very strange problem with one of my mex files. This behaves differently on Linux and Windows. On the first, it works well (mex uses CUDA cufft and kernels, native), but under Windows I get

  • cufft distribution crashes that I fixed
  • outstanding calculations even after the first fix.

The main mex function is in .cu, I will compile it on PC using toolkit 6.5 and VS 2012 Pro for Windows. On Linux I will compile it using gcc and mex command.

For both platforms, I am using dynamic linking, 64 bit Release and openMP dynamic linking for Windows. The Windows version doesn't always fail. At first I thought it might be a memory allocation error, but now I believe it is a CUDA grid options error as some of my arrays are not full.

My questions are as follows

  • on Windows, are there different kernel sizes than Linux? (unforgivable, but ...)
  • Could MATLAB 2013b issue be a problem? (I am posting mex to Matlab 2014a users)
  • Are there other known differences in C ++ or CUDA programming between Linux and Windows?

Thanks in advance,

Julien

+3


source to share





All Articles