MATLAB runtime Windows multiple MCRs

3 ビュー (過去 30 日間)
Sunny Gupta
Sunny Gupta 2012 年 12 月 8 日
"MATLAB runtime run in parallel if it's loaded on separate processes" How do you run multiple MCRs and make them use a separate process in windows......Please don't tell me to read the manual...Looking for precise instructions....Thanks
[Merged information from Duplicate Question]
When I run two executables concurrently they take double amount of time to run. The MCR is single threaded so running the compiled exe in another shell (command prompt call with &) doesn't help. This is running on a very fast 6 core i7 machine with 64 GB of ram. Is this a problem with JVM contention ?
How do I make two executable programs in Matlab run faster in Windows Server ?
Is this a limitation when you multiple compiled executables?
I'm hoping someone at Mathworks can answer this very simple question.

採用された回答

Sunny Gupta
Sunny Gupta 2012 年 12 月 8 日
Thanks for that...However, when I run both executables concurrently they take double amount of time to run. The MCR is single threaded so running the compiled exe in another shell doesn't help. How do you run multiple MCR's ? I know different versions of the MCR can be installed and this provides concurrency to each compiled version.
  3 件のコメント
Sunny Gupta
Sunny Gupta 2012 年 12 月 10 日
編集済み: Sunny Gupta 2012 年 12 月 10 日
Hi Walter, is the best way to solve this concurrent scaling problem with a compiled MCR dependant app is to limit the number of threads to less than the number of available CPU's?
So say you have a 6 core machine, setting the maximum number of computational threads using maxNumCompThreads to two for example would allow three concurrent instances to avoid competing for same resources.
Walter Roberson
Walter Roberson 2012 年 12 月 10 日
I do not know about the best way, but Yes, you need to avoid having all processes content for all cores.
Note for this that even if you do not use the Parallel Computing Toolbox, that over the years automatic parallelization (especially of mathematics functions) has gotten better, especially when large array sizes are involved. For example, sum() of a large array might get handled off to parallel routines, and that would happen even without the Parallel Computing Toolbox. But unless you are using PCT and a scheduler, the executables do not have any idea that they might be stepping on each other's toes by trying to use resources that another executable is already using. Restricting the number of threads should help in these situations.

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 12 月 8 日
Invoke the executable from different command shells, or invoke the executable from the command shell but use & at the end of the command to run the executable in the background.
The opposite of this would be having a driver program (e.g., Visual C++) that invoked the engine from multiple threads in the same executable.

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by