parfor memory usage inefficiency

11 次查看(过去 30 天)
I'm using a parfor loop in my code. One of the things I pass to the workers is a very large data cell array that matlab copies in entirety to each worker. Each worker works on a subset (determined on certain groupings I calculate beforehand) of the data cell array. This is obviously very inefficient and I sometimes run out of memory. I do not change anything in the original data cell array. Is there any way I can tell matlab not to create a copy of the original data cell array and instead reference the original to get around this issue?
  1 个评论
Matt J
Matt J 2013-1-31
We'd have to see your code. If the data is a sliced variable, only the slice used by each worker should be copied.

请先登录,再进行评论。

采纳的回答

Jason Ross
Jason Ross 2013-1-31

更多回答(1 个)

Shishir Moudgal
Shishir Moudgal 2013-1-31
Perfect ... I'll give it a shot. Thank you. I was working on an alternative using matfile.

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by