Force compiled matlab program to run via runtime, not application
古いコメントを表示
Apologies for what might be a basic question. I am trying to get a GUI someone else made and compiled using Matlab 2017b to run on my computer (Windows 10 64 bit). I need it to run off the appropriate Matlab runtime (which was installed along with the GUI, v93) rather than the version of the Matlab application I have installed on my computer (2014a), which is I'm pretty sure what it's doing currently--it should use the GPU for calculations if running off the runtime but it'll use the CPU otherwise, and as far as I can tell it's using the CPU only. What I don't understand is how to force the compiled code to run off the runtime not the application, so far that's beyond my ability to figure out. I've seen these notes about making sure the path the compiled code sees first is the runtime, but I do not understand how to actually change that. I have the GUI application files installed in MATLAB/MATLAB Runtime/v93/runtime/win64/, but I don't know if that's enough to do it.
Thanks for your help.
(If it matters, what the GUI does is fit points from single-molecule fluorescence experiments using a spline function, and if it uses the CPU it can do about 2000 fits/second, but on the GPU it should be able to do about 100,000 fits/second. I am only getting 2000 fit/s which is why I know it's not using the GPU. I have a GTX960 installed with what should be an appropriate CUDA driver).
7 件のコメント
Walter Roberson
2018 年 6 月 3 日
Compiled applications always need to use a version of MCR that corresponds to the version they were compiled with. If you compiled with R2017b and have an R2014a MCR on the machine, then the compiled executable will ignore the R2014a MCR.
What can happen is that if you create an executable with R2017b that uses the R2017b MCR, and you also have R2017b with MATLAB Compiler installed, then the executable might use libraries from the R2017b MATLAB Compiler installation instead of from the installed R2017b MCR. Those should be identical, so the only way this really matters is that you might think you are testing that MCR was properly installed but instead be getting the version of the MATLAB Compiler installation.
fredtbn1gs
2018 年 6 月 4 日
Greg
2018 年 6 月 4 日
I'll sum up (restate) what Walter already told you:
It is already using the v93 runtime.
It doesn't work any other way, whatever your problem is has nothing to do with the runtime.
Greg
2018 年 6 月 4 日
So the real question is why is code I got from somebody else apparently using CPU instead of GPU?
Are you sure the compiled code is written to use the GPU? Do you have source code or just the .EXE file? You should also be able to very easily determine if it's using CPU; just open task manager and launch the application.
Walter Roberson
2018 年 6 月 4 日
What would the executable do if it could not detect the GPU?
(Your gtx 960 should be cuda level 5.2 which should be plenty.)
fredtbn1gs
2018 年 6 月 4 日
Walter Roberson
2018 年 6 月 4 日
Can you provide a link?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!