matlab crashes when using parfor because of low memory

5 ビュー (過去 30 日間)
Nils
Nils 2015 年 8 月 21 日
回答済み: Varun Bhaskar 2015 年 8 月 25 日
Hey everyone,
I have a problem when using parfor in Matlab. I generated a table with about 2.5mio by 1500 parameter which I want save to a postgreSQL Database.
In this table are different parts which I want to save in a parfor loop (It is possible to split this table into a multiple smaller tables). When I use a normal for loop it is running perfectly however with a parfor Matlab is crashing all the time because Matlab duplicates the entire workspace for each worker. Is there any way to control which variables are send to a worker or can I delete unused variables on a worker?
  1 件のコメント
Adam
Adam 2015 年 8 月 21 日
It should only copy those variables used within the parfor loop to the workers, but if you do not get the slicing correct it may copy the entire dataset to all workers or the entire results array or whatever else is being shared between the workers.

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

回答 (1 件)

Varun Bhaskar
Varun Bhaskar 2015 年 8 月 25 日
Hi,
Can you have variables that are required by each worker declared after opening parpool, and the ones that needn't be distributed among workers before calling parpool?

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by