How to run multiple instances of MCR
显示 更早的评论
I have problem to solve how to run something parallel without using a parallel toolbox. (i'am using C# for my application)
I don't need some fast parallel operations ,i just want to run one simple function while other long process is running, and not to wait while this long process is over.
Mine one tought was to create two separate assemblies, and to call functions in from them..is it that possible and do i need to create separate wrappers for that assemblies, and how can i do that if it is possible!??
采纳的回答
更多回答(1 个)
owr
2012-10-16
0 个投票
I built something in the past as a test that was able to do this - if I recall it wasnt too difficult (and Im not very proficient in C#).
As Friedrich mentioned, the issue is that the MCR is process bound. So you need your C# application to launch/manage multiple processes.
The way I set it up is each MATLAB task had its own C# exe wrapped around it, I called these "worker1", "worker2" etc. Then I had a master C# application that could create processes independently and attach the workers to these processes.
Take a look on MSDN at the "Process" command in C#. Like I mentioned, I am quite inexperienced in C# but was able to get it all working in about a day, some time ago.
Hope this helps.
类别
在 帮助中心 和 File Exchange 中查找有关 Installation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!