Force compiled matlab program to run via runtime, not application

4 次查看(过去 30 天)
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 个评论
fredtbn1gs
fredtbn1gs 2018-6-4
Thanks for bearing with me, my matlab knowledge is almost entirely scripting fairly simple things for basic data manipulation and I know almost nothing about compiling/making GUIs etc. I understand now that the GUI must be using the correct v93 runtime or else it wouldn't work.
I do have the source code, some of which is m files I can read and some of which is filetypes I've honestly never heard of (I assume some of it is the basic functions and some of it is compiled in various ways). According to the paper this code is published in, the EXE should automatically use the GPU if on Windows with the proper GPU and software (ie CUDA drivers) installed. Otherwise, it will use the CPU. I have been working from their EXE file so far.
The GUI is definitely running off the CPU, it shows up in task manager and the % usage ramps up while it's running, then back down, with no change in GPU usage.
Also I was wrong, it's a GTX970, but I imagine that makes no particular difference.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by