Kilosort icon indicating copy to clipboard operation
Kilosort copied to clipboard

Issues with mexcuda using Matlab 2020b, Cuda 10.2 & Visual Studio 2013?

Open YasmineShamayleh opened this issue 3 years ago • 4 comments

I have Matlab 2020b and Visual Studio 2013 installed.

According to the website provided, I need Cuda Version 10.2 https://www.mathworks.com/help/parallel-computing/gpu-support-by-release.html

I therefore downloaded exactly that version. Then a terminal window, I double checked that the version I have is 10.2, as follows:

C:\Users\User>nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019 Cuda compilation tools, release 10.2, V10.2.89

However, when I run the mexGPUall function in Matlab I get the following error:

mexGPUall Error using mex No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.

Error in mexcuda (line 166) [varargout{1:nargout}] = mex(mexArguments{:});

Error in mexGPUall (line 7) mexcuda -largeArrayDims mexThSpkPC.cu

Please advise. Yasmine

YasmineShamayleh avatar Jun 22 '21 23:06 YasmineShamayleh

I could compile in R2020b with visual studio 2019, you could also check if a c++ compiler is available in MATLAB: mex -setup c++

babaq avatar Jun 24 '21 02:06 babaq

I see - so you think the problem might be my version of visual studio? I will try it with visual studio 2019 and see. Could you please confirm that you used Cuda 10.2 with Matlab R2020b? Thanks!

YasmineShamayleh avatar Jun 24 '21 12:06 YasmineShamayleh

yes, I just installed recommended CUDA version 10.2 for MATLAB R2020b

babaq avatar Jun 24 '21 18:06 babaq

Thanks for this feedback! I appreciate it. I ended up installing Visual Studio 2019 (instead of 2013). I then ran "mex -setup cpp" in Matlab. I was then able to run "mexGPUall" successfully!

YasmineShamayleh avatar Jun 25 '21 00:06 YasmineShamayleh