Large broadcast variable in parfor loop
Show older comments
Hi
Im having a for loop that i want to parallelize. In the loop th essential part is an interpolation. The problem is that the interpolant is huge, (V has 2 to 4 GB). Once I parallelize the loop, this read-only broadcast variable is multiplied in the memory and i run out of memory.
Is there a way to avoid this? i.e. to have the speedup benefits of parallalizing without the need to duplicate the huge interpolant in the memory?
IP=scatteredinterpolant(w,x,y,z,V)
parfor i=1:N
user_function( parameters, IP(ww(i),xx(i),yy(i),zz(i)) )
end
Thanks Dominik
Accepted Answer
More Answers (1)
dominik
on 25 Nov 2013
0 votes
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!