Compiler problem while using GPU
    6 views (last 30 days)
  
       Show older comments
    
Hi, I am trying to use GPU for Matconvnet code on Matlab 2014b using windows 7. I installed Microsoft Visual C++ 2013 Professional compiler. Even it can be seen from below that it is perfectly working with mex codes (when i use cpu mode).
>>mex -setup
MEX configured to use 'Microsoft Visual C++ 2013 Professional' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
   variables with more than 2^32-1 elements. In the near future
   you will be required to update your code to utilize the
   new API. You can find more information about this at:
   http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
In CPU mode the code works. But when i go to GPU mode. It gives below error. Can any one guide whats the problem in it. Error is given Below.
vl_compilenn('enableGpu', true)
vl_compilenn:  CUDA: MEX config file: 'C:\Program Files\MATLAB\R2014b\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml'
Starting parallel pool (parpool) using the 'local' profile ... connected to 2 workers.
Error using vl_compilenn>mex_compile (line 431)
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2014b/win64.html.
Error in vl_compilenn>(parfor body) (line 390)
mex_compile(opts, srcs{i}, toobj(bld_dir,srcs{i}), flags.mexcu) ;
Error in vl_compilenn (line 384)
parfor i = 1:numel(horzcat(lib_src, mex_src))
My GPU device is
ans = CUDADevice with properties:
                      Name: 'GeForce GT 640M LE'
                     Index: 1
         ComputeCapability: '3.0'
            SupportsDouble: 1
             DriverVersion: 6
            ToolkitVersion: 6
        MaxThreadsPerBlock: 1024
          MaxShmemPerBlock: 49152
        MaxThreadBlockSize: [1024 1024 64]
               MaxGridSize: [2.1475e+09 65535 65535]
                 SIMDWidth: 32
               TotalMemory: 1.0737e+09
           AvailableMemory: 971497472
       MultiprocessorCount: 2
              ClockRateKHz: 570000
               ComputeMode: 'Default'
      GPUOverlapsTransfers: 1
    KernelExecutionTimeout: 1
          CanMapHostMemory: 1
           DeviceSupported: 1
            DeviceSelected: 1
And i have Cuda 6.0 for it. How can i remove this error or fix it.
Regards khan
3 Comments
  Joss Knight
    
 on 28 May 2015
				You need to edit MatConvNet's mex-compile function and add -v to the mex command. Just to be sure, you need to have installed the CUDA 6.0 toolkit, not just the driver. If you have installed it, maybe the bin directory is not on your system path - verbose output will tell you.
Answers (0)
See Also
Categories
				Find more on Introduction to Installation and Licensing 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!