Nikolai
Nikolai

Reputation: 1549

MPI_Scatter values with repetitions

For example I have 6 MPI nodes forming a 1D grid. On the master process I have some values for the edges of the grid:

[1 2 3 4 5]

And I want to distribute these values to put each value to both nodes that are adjacent to the corresponding edge. That is, I want to get the following data distribution among the nodes:

1 | 1 2 | 2 3 | 3 4 | 4 5 | 5

What is the best way to perform this? Seems that this cannot be done with a single MPI_Scatter call.

Upvotes: 0

Views: 189

Answers (0)

Related Questions