Error when running compiled application: Undefined function ’parallel.​internal.g​pu.ptxExpr​’

3 Ansichten (letzte 30 Tage)
I’m trying to use the Application Compiler to deploy my Matlab program. The packaging appears to be successful but when I run it I’m getting the error:
Undefined function ’parallel.internal.gpu.ptxExpr’ for input arguments of type ‘mtree’
Which I’m guessing means that there is some internal Matlab function that needs to be added when creating the application that is related to using gpuArrays in the code. But I’ve searched the entire Matlab folder for anything including the name “ parallel.internal.gpu.ptxExpr ”, but I can’t find anything.
Does anyone know what’s causing this and what file I need to add when I compile the application?
Thanks.

Akzeptierte Antwort

Peta
Peta am 17 Aug. 2015
I managed to solve this myself after a while. Hidden deep within the parallel computing toolbox folder in the Matlab root there is a file called “ptxExpr.p” that I needed to add when running the application compiler. And after that the error message will change to a different file – and another – and another, and so on, but if you keep searching for .p files and adding them it eventually worked.
But it’s a bit absurd to have to do this manually when using the application compiler. Please fix this in a future release Mathworks…
  5 Kommentare
Peta
Peta am 23 Aug. 2015
I’m not sure what you mean I should do when you say:
$ ./run_tmp.sh /local/MCR/R2015a/v85
But if you simply mean I should run the compiled application then yes that works and I also get 2 as a result.
I should perhaps also say that the script I was getting my ptxExp errors from when compiling didn’t in itself contain any gpuArray commands, but it called another function where it was used, so maybe Matlabs file dependency analysis can’t detect that gpu support should be enabled when it isn’t used in the main file that is being compiled.
Edric Ellis
Edric Ellis am 24 Aug. 2015
The dependency analysis ought to work in this case. Do you have a reproduction that you could post here? (Or perhaps you could send to MathWorks support...).

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by