Split a matrix on parallel computing with spmd

조회 수: 14 (최근 30일)
Cèsar
Cèsar 2014년 1월 29일
댓글: Cèsar 2014년 1월 30일
As I can split a vector 4x18 in four workers each with a 1x18 table, selecting the vector for each worker in parallel computing with spmd.
  댓글 수: 2
Walter Roberson
Walter Roberson 2014년 1월 30일
That would sound like something more natural for parfor ?
Cèsar
Cèsar 2014년 1월 30일
Hi, Walter How can i do with parfor.

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

채택된 답변

Edric Ellis
Edric Ellis 2014년 1월 30일
You could do that using distributed arrays. For example
spmd
d = codistributed(rand(4, 18), codistributor1d(1))
end
will result in each worker storing a 1x18 portion of d.

추가 답변 (1개)

Cèsar
Cèsar 2014년 1월 30일
Thank you so much, it works really good. But if i want to distributed the array in a some especific way in to the workers, for example if i had 4 workers and a array of 5x18 and i want in the first worker an array of 1x18, in the second 1x18, the third 2x18 and in the forth 1x18,how could i do, thank you so much for your answers.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by