parfor memory usage inefficiency

14 visualizzazioni (ultimi 30 giorni)
Shishir Moudgal
Shishir Moudgal il 30 Gen 2013
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 Commento
Matt J
Matt J il 31 Gen 2013
We'd have to see your code. If the data is a sliced variable, only the slice used by each worker should be copied.

Accedi per commentare.

Risposta accettata

Jason Ross
Jason Ross il 31 Gen 2013

Più risposte (1)

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

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by