Split a matrix on parallel computing with spmd

4 vues (au cours des 30 derniers jours)
Cèsar
Cèsar le 29 Jan 2014
Commenté : Cèsar le 30 Jan 2014
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 commentaires
Walter Roberson
Walter Roberson le 30 Jan 2014
That would sound like something more natural for parfor ?
Cèsar
Cèsar le 30 Jan 2014
Hi, Walter How can i do with parfor.

Connectez-vous pour commenter.

Réponse acceptée

Edric Ellis
Edric Ellis le 30 Jan 2014
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.

Plus de réponses (1)

Cèsar
Cèsar le 30 Jan 2014
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.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by