How To Compile .cu files for execution in Matlab

5 views (last 30 days)
I'm trying now about one month just to find the answer for this question where I can find this file
EDU>> cuda_mex simple.cu
Can't open perl script "C:\Program Files (x86)\MATLAB\R2011a Student\bin\cuda_mex.pl": No such file or directory
??? Error using ==> cuda_mex at 208
Unable to complete successfully.
EDU>>
I looked here but it is not here
C:\Program Files (x86)\MATLAB\R2011a Student\bin
so how can I fix this problem ?
is there is any way to use cuda in MATLAB easier than useing cuda_mex.m that gave you many error and do't know what to do with those files?
Thank you
  1 Comment
Friedrich
Friedrich on 13 Apr 2012
Parallel Computing Toolbox can help you here:
http://www.mathworks.com/help/releases/R2012a/toolbox/distcomp/bslohnr-1.html

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 11 Apr 2012
  6 Comments
Lahdan alfahian
Lahdan alfahian on 13 Apr 2012
I did this option Use User Account Control (UAC) to off
then what I did is gearate ptx file in 64 bit in out university machin since I coud't do it by nvcc regarding to many error on Visula studio 2010 and 2008 , I put my file test.cu and my test.ptx in Matlab folder then try to construct the kernel
EDU>> k = parallel.gpu.CUDAKernel('simple.ptx', 'simple.cu' , 'add');
then I got this error
??? Error using ==> iCheckPTXEntryAgainstCProto at 411
Expected pointer type but found .u64
Error in ==> C:\Program Files (x86)\MATLAB\R2011a
Student\toolbox\distcomp\gpu\+parallel\+internal\+gpu\handleKernelArgs.p>handleKernelArgs
at 81
now what ??
this file handleKernelArgs.p I tried to opent it it has @!@$#28 diffrent symole and not reduble
please help me to find the problem ,do you think it is becase the visul studio??
Friedrich
Friedrich on 13 Apr 2012
Seems like you compiled it on a 64bit machine and you now try to use it in a 32bit MATLAB which wont work. What happens when you compile that cu file on your machine? Try to follow the example in the doc. Does this work?

Sign in to comment.

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!