Minimize MDCS Data Transfer

조회 수: 1 (최근 30일)
Philip
Philip 2014년 10월 27일
댓글: Philip 2014년 10월 31일
I am using MDCS on a Linux cluster. I repeatedly for a parfor loop in the following spirit:
while
parfor i=1:n
x(i) = a(i,:)*b;
end
end
Here the vector b is used on all cores, every time I call parfor. However, I believe each time I call parfor, b is being sent to all the cores, which slows down the code. How can I repeatedly use parfor with constant data such that I do not have to keep resending the same data each time I call a parfor loop? Thank you.

채택된 답변

Edric Ellis
Edric Ellis 2014년 10월 29일
You could use the Worker Object Wrapper which is designed for this sort of situation.
  댓글 수: 1
Philip
Philip 2014년 10월 31일
Thank you! This is exactly what I needed- it really sped up my code.

댓글을 달려면 로그인하십시오.

추가 답변 (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