matlab parallel computing/GPU error msg

7 views (last 30 days)
my code:
kp = parallel.gpu.CUDAKernel('derivative.ptx','','derivative');
my error message:
"??? Undefined variable "parallel" or class "parallel.gpu.CUDAKernel"."
I know that my code is not completely right, but I expect it gets something else, at least not this error message, which I do not know how to interpret. Does that mean I do not have a nVidia GPU card on my computer? Or does that mean my Matlab is too old (R2009) to support parallel computing? Surprisingly, when I googled this error message, not many results showed up.
I ran the same line on another machine, the error message was:
"Error using handleKernelArgs (line 48) The first input to parallel.gpu.CUDAKernel must be a file that contains PTX code or a string that is PTX code."
So can I still use parallel computing on my computer? If so, what should I do?
Any suggestion is appreciated. Thanks a lot.

Accepted Answer

Jason Ross
Jason Ross on 9 Mar 2012
  1 Comment
Jill Reese
Jill Reese on 9 Mar 2012
Jason is correct. You are using a MATLAB version that doesn't support GPU computing. You'll need to upgrade to at least R2010b, but you should use the most recent release you have available. R2010b was the first to enable GPU computing, but each subsequent release added many new features and performance improvements.

Sign in to comment.

More Answers (2)

Malcolm Lidierth
Malcolm Lidierth on 9 Mar 2012
I think it means you do not have the Parallel Computing Toolbox. Try
at the command line.

Walter Roberson
Walter Roberson on 9 Mar 2012
Right: PCT not installed or not licensed.
PCT is an optional extra-cost toolbox.
Further note: GPU use requires an NVidia card with CUDA 1.3 or later. There are a lot of NVidia cards that support only CUDA 1.2, so before spending money on the PCT, check the CUDA version supported by your card
  1 Comment
Jason Ross
Jason Ross on 9 Mar 2012
To be very pedantic and boring, Walter is referring to the "Compute Capability" of a given GPU, which needs to be 1.3 or higher. The linked page displays this very nicely.
The CUDA Version is something that's determined by the CUDA driver installed on the machine, and it's independent of the hardware. Generally speaking, it's a good idea to have the most recent CUDA driver installed, which you get from nVidia's driver download section:

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by