Problem with compiling .cu files

3 views (last 30 days)
Shala
Shala on 14 Sep 2014
Commented: Geoff Hayes on 17 Sep 2014
Good day Matlab community :)
I am currently trying to rework my mex files so they support gpuArray input, but my biggest problem ist actually getting the .cu compiler to work. I originally planned to use CUDA 6.5 with Visual Studio 2013, but during the last week of try-and-error I also installed Visual Studio 2012, and the CUDA 5.5 and 6.0 toolkits.
I followed the instructions from MATAB MEX CUDA, but compiling the given test file gives the following error in all configurations:
>> mex -v -largeArrayDims mexGPUExample.cu
Verbose mode is on.
... Looking for compiler 'NVIDIA CUDA Compiler' ...
... Looking for environment variable 'VS100COMNTOOLS' ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 10.0' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
Did not find installed compiler 'NVIDIA CUDA Compiler'.
Error using mex
No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2014a/win64.
I greatly appreciate any insight on this problem
Kind regards
P.S: I use (and need to use) MATLAB 2014a with image processing and parallel computing toolboxes
  5 Comments
Shala
Shala on 17 Sep 2014
Anyone with further ideas about this ?
Geoff Hayes
Geoff Hayes on 17 Sep 2014
Which version of the Windows SDK do you have installed? If I change the directory (on my PC) to
C:/Program Files/Microsoft SDKS/Windows
I see two directories
v6.0A
v7.0A
What do you observe on your PC? (Note that there may be some differences in the path that I use and that which you will check, but the idea is the same.)
Given that the above verbose output from mex -v -largeArrayDims mexGPUExample.cu is looking for v7.0A at
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A' InstallationFolder ...No.
you will need this SDK version.
If you do have it, then it sounds like (for whatever reason) you are missing the registry keys. Using regedit, I looked under HKEY Current User (HKCU) for SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A and all I could see was the same for v6.0A. I then checked HKEY Local Machine (HKLM) and did find the InstallationFolder for the key SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A. (The data for InstallationFolder was just the path C:/Program Files/Microsoft SDKS/Windows/v7.0A/.)
So - you need to check if you have v7.0A of the Microsoft SDK. If so, then check the registry. If not, then I suppose you will have to install this SDK (or perhaps a later version of it). This is not something that I have done, and so is more guesswork than anything.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB 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!