out of memory with spmd

3 次查看(过去 30 天)
fpexp
fpexp 2017-12-28
评论: fpexp 2017-12-29
Hello there, I have been having troubles with the use of spmd blocks with the Matlab Parallel Computing Toolbox. My question is: assume that ind_*** are sub2index vectors and P is a very large (but far smaller than my RAM) 4d matrix, and all the rest are conformed vectors. Why does the RAM inflates enormously and eventually activate the swap mem until I get a
"The client lost connection to worker 2. This might be due to network problems, or the interactive communicating job might have errored."
if I run this:
spmd
P = PP(:,:,:,:,1);
p_star = P(ind_000).*wp_0;
p_star = p_star + P(ind_100).*wp_s;
p_star = p_star + P(ind_010).*wp_t;
p_star = p_star + P(ind_001).*wp_r;
end
whereas the following does not encounter the same problem (memory just slightly inflates)
spmd
P = PP(:,:,:,:,1);
end
spmd
p_star = P(ind_000).*wp_0;
end
spmd
p_star = p_star + P(ind_100).*wp_s;
end
spmd
p_star = p_star + P(ind_010).*wp_t;
end
spmd
p_star = p_star + P(ind_001).*wp_r;
end
what is the difference between the two processes? Thanks a mil for the answer
  2 个评论
fpexp
fpexp 2017-12-29
I want to add that PP, and the ind_***, wp_* are "local" variables, therefore I suspect that the first instruction duplicates the instrumental var all together, whereas the other instructions double copy each single var and then release the RAM at each end. Does this conjecture make any sense?
fpexp
fpexp 2017-12-29
Hence, the Matlab Workers do not share the RAM with the local client?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Parallel Server 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by