CUDA 3.2+ MATLAB R2010B + Visual Studio 2010 has anybody been able to compile mex/cuda code on visua

Dear All,

I have some CUDA code that I was running on my windows XP x64/Matlab r2009a/Visual studio 2008 machine. Our company decided to upgrade to a newer version of everything (windows 7 x64/Matlab r2010B/visual studio 2010/cuda 3.2). I am unable to compile my mex files under this environment due to some incompatibilities between nvcc and c++0x.

Has anybody been able to compile mex/cuda code under matlab r2010b/vs 2010 ?

Thank you in advance for your help.
Al

Dear All,

I have some CUDA code that I was running on my windows XP x64/Matlab r2009a/Visual studio 2008 machine. Our company decided to upgrade to a newer version of everything (windows 7 x64/Matlab r2010B/visual studio 2010/cuda 3.2). I am unable to compile my mex files under this environment due to some incompatibilities between nvcc and c++0x.

Has anybody been able to compile mex/cuda code under matlab r2010b/vs 2010 ?

Thank you in advance for your help.
Al

I’ve not seen any problems in our company similar to what you are reporting. Everything is working smoothly for us.

You might want to consider using the Jacket SDK for your MATLAB integration, rather than building directly via MEX. Learn why the Jacket SDK trumps standalone MEX. Let us know if we can be useful to you (my email is in my signature below).

I’ve not seen any problems in our company similar to what you are reporting. Everything is working smoothly for us.

You might want to consider using the Jacket SDK for your MATLAB integration, rather than building directly via MEX. Learn why the Jacket SDK trumps standalone MEX. Let us know if we can be useful to you (my email is in my signature below).

I didn’t try that setup. What I usually do for other reasons (keep CUDA algorthim separate from mex) is to split the CUDA code into a cu file and the rest of the code into a cpp file and compile the cu externally either to object or library. nvcc is limited with some aspect of c++ (I can’t use cout in cu files either for example)

You may also want to look at the parallel computing toolbox in 2010b that allows you to run kernels directly from MATLAB among other things. It’s support for using the GPU from withing MATLAB is more limited than Jackets implementation, but as far as I know jacket don’t support direct kernel execution or control over GPU side buffers (didn’t try it past version 1.1 or so though, so I don’t know where things stand at the moment).

I didn’t try that setup. What I usually do for other reasons (keep CUDA algorthim separate from mex) is to split the CUDA code into a cu file and the rest of the code into a cpp file and compile the cu externally either to object or library. nvcc is limited with some aspect of c++ (I can’t use cout in cu files either for example)

You may also want to look at the parallel computing toolbox in 2010b that allows you to run kernels directly from MATLAB among other things. It’s support for using the GPU from withing MATLAB is more limited than Jackets implementation, but as far as I know jacket don’t support direct kernel execution or control over GPU side buffers (didn’t try it past version 1.1 or so though, so I don’t know where things stand at the moment).

thank you for your quick response. I have already tried jacket and it works really well for what it is supposed to do (congratulations, great work !!). In our case, using Jacket on all our workstations is not economically viable. the reason we opted for GPUs is their cost/performance ratio so deploying Jacket on 25+ WS kinda defeats the purpose.

Now, you say you are not having any problem with your install, I do :) I would be really thankful if you could make the nvmexopts.bat available to the community. NVIDIA did not bother to update their plugin since 1.1 (and only for x86 while we’re under x64).

thank you for your quick response. I have already tried jacket and it works really well for what it is supposed to do (congratulations, great work !!). In our case, using Jacket on all our workstations is not economically viable. the reason we opted for GPUs is their cost/performance ratio so deploying Jacket on 25+ WS kinda defeats the purpose.

Now, you say you are not having any problem with your install, I do :) I would be really thankful if you could make the nvmexopts.bat available to the community. NVIDIA did not bother to update their plugin since 1.1 (and only for x86 while we’re under x64).

You could also use cmake. I used to work with nvmex, but cmake is much more easy. I have posted my CmakeList.txt a while ago on these forums. Then you can deploy on either win32/win64/lin32/lin64.

Are you btw sure that your problem is not just the fact that VS2010 is not yet supported and you have to install the compiler of vs2008???

You could also use cmake. I used to work with nvmex, but cmake is much more easy. I have posted my CmakeList.txt a while ago on these forums. Then you can deploy on either win32/win64/lin32/lin64.

Are you btw sure that your problem is not just the fact that VS2010 is not yet supported and you have to install the compiler of vs2008???