parfor memory usage inefficiency

조회 수: 11 (최근 30일)
Shishir Moudgal
Shishir Moudgal 2013년 1월 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