Error using mex No supported compiler was found - Windows10 Matlab2019a
Show older comments
Hello,
I am trying to setup kilosort2 (a spike sorting package here: https://github.com/MouseLand/Kilosort2). It instructs me to set up mexcuda support. I am using Matlab2019a on Windows 10 and installed CUDA 10.1. I also installed Visual Studio Community 2019 and MinGW-64 compiler add-on. However, when I run the necessary script to setup kilosort2, I get this error:
Error using mex
No supported compiler was found. For options, visit https://www.mathworks.com/support/compilers.
This is the associated code:
mexcuda -largeArrayDims mexThSpkPC.cu
mexcuda -largeArrayDims mexGetSpikes2.cu
mexcuda -largeArrayDims mexMPnu8.cu
mexcuda -largeArrayDims mexSVDsmall2.cu
mexcuda -largeArrayDims mexWtW2.cu
mexcuda -largeArrayDims mexFilterPCs.cu
mexcuda -largeArrayDims mexClustering2.cu
mexcuda -largeArrayDims mexDistances2.cu
When I try mexsetup, I get this:
>> mex -setup C++
MEX configured to use 'MinGW64 Compiler with Windows 10 SDK or later (C++)' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
https://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different C++ compiler, select one from the following:
MinGW64 Compiler (C++) mex -setup:C:\MATLAB\R2019a\bin\win64\mexopts\mingw64_g++.xml C++
MinGW64 Compiler with Windows 10 SDK or later (C++) mex -setup:C:\Users\EMoore\AppData\Roaming\MathWorks\MATLAB\R2019a\mex_C++_win64.xml C++
Microsoft Visual C++ 2019 mex -setup:C:\MATLAB\R2019a\bin\win64\mexopts\msvcpp2019.xml C++
I've tried all the different C++ compilers listed at the end and get the same error if I re-run the mexcuda commands. I believe I'm using the correct versions, given the documentation online.
In case it helps, this is what I get when I look at gpuDevice:
gpuDevice
ans =
CUDADevice with properties:
Name: 'GeForce GTX 1060 6GB'
Index: 1
ComputeCapability: '6.1'
SupportsDouble: 1
DriverVersion: 10.1000
ToolkitVersion: 10
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 6.4425e+09
AvailableMemory: 5.2377e+09
MultiprocessorCount: 10
ClockRateKHz: 1708500
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
I am very new to using compilers, so I may be missing something obvious when reading through the readme file and online instructions. Does anyone know what my problem might be or what I could try? Thanks,
2 Comments
Walter Roberson
on 2 Aug 2019
Reading between the lines because I do not find explicit documentation at the moment, it looks like for windows for mexcuda you need to have VS 2017 or VS 2015 Professional
Elisabeth Moore
on 2 Aug 2019
Answers (0)
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!