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