Strange limits on Parallel RAM Usage by Compiled Standalone

2 ビュー (過去 30 日間)
Matt J
Matt J 2014 年 8 月 15 日
コメント済み: Matt J 2014 年 9 月 8 日
I have a MATLAB-compiled standalone .exe on a desktop with 20 cores and 32GB RAM. Because of the ample resources of the desktop, I tried to launch several instances of the .exe in parallel. I find that any more than 2 instances running in parallel will crash with memory allocation error messages. However, each instance on its own consumes no more than 4 GB RAM according to the Windows Task Manager. With 32GB RAM total, I reason that 4 instances should easily be able to run side-by-side.
Any theories as to why I am limited to so few instances when I have so much RAM to spare?
  5 件のコメント
Matt J
Matt J 2014 年 8 月 16 日
編集済み: Matt J 2014 年 8 月 16 日
I could try making copies, but it's hard to see why a locked file would lead to memory allocation errors... And the common file is just a .mat file with no unusual permissions set. If the file is being read by a particular process, I don't see why other processes wouldn't simply wait their turn for access to it.
dpb
dpb 2014 年 8 月 16 日
I don't know, either -- simply wondering if might help uncover what's going on if symptoms were to change is all...

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

採用された回答

Matt J
Matt J 2014 年 8 月 18 日
編集済み: Matt J 2014 年 8 月 18 日
A co-worker suggested a possible explanation. The MATLAB .exe is 64-bit compiled and is deployed on a 64-bit desktop. However, it is calling some external DLLs that were 32-bit compiled. The way I understand things from my co-worker, such DLLs execute in some virtual 32-bit Windows machine where the total available RAM is only 4GB. This 4GB RAM is shared by all other processes that happen to be running the DLL at the same time.
If the above is the true picture of how 32-bit DLLs run under 64-bit Windows, it would explain why memory ceiling is a lot more limited than I think it is. I welcome comments from anyone who can either confirm or refute this theory.
  1 件のコメント
Matt J
Matt J 2014 年 9 月 8 日
As further evidence of the above, I am finding that I can run more than 3 parallel processes without difficulty, even when memory intensive, when I omit the steps that use the 32-bit DLLs. I'm closing the question based on this, but still welcome further theories.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by