I want to compile .cu code on my matlab 2015a using 'mexcuda' but i am getting errors as shown

2 views (last 30 days)
mexcuda -v -largeArrayDims mexGPUExample.cu
Undefined function or variable 'mexcuda'.
and
mex -v -largeArrayDims mexGPUExample.cu
Verbose mode is on.
No MEX options file identified; looking for an implicit selection.
Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2015a/win64.html
i have parallel tool kit and compilers installed on my system .
  2 Comments
Walter Roberson
Walter Roberson on 25 Nov 2015
What do you get if you use
mex -setup
It appears as if you do not have a supported compiler installed in your system.
Which operating system version are you using?
nikhil mhala
nikhil mhala on 25 Nov 2015
Edited: Walter Roberson on 25 Nov 2015
MEX configured to use 'Microsoft Windows SDK 7.1 (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. 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.
To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN

Sign in to comment.

Accepted Answer

Edric Ellis
Edric Ellis on 25 Nov 2015
The function mexcuda was introduced in R2015b. You'll need to follow the instructions in the R2015a documentation: http://www.mathworks.com/help/releases/R2015a/distcomp/run-mex-functions-containing-cuda-code.html#btrgjh3-1

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) 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!