MATLAB: Parfor memory usage inefficiency

memoryparallel computingParallel Computing Toolboxparfor

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?

Best Answer