Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPI virtual graph topology broadcast

I have a following problem:

I would like to create a virtual topology based on tree graph for example:

   0
 /   \
1    5
| \  | 
2  4 3

Vertices' numbers are ranks of processes.

I managed to do that and i have a handle on my new communicator:

MPI_Comm graph_comm;
MPI_Graph_create(MPI_COMM_WORLD, nnodes, indexes, edges, 0, &graph_comm);

Now my question is: Is there a possibility to send a broadcast (MPI_Bcast) from each of parent nodes that has children to their children only (in this example process with rank 0 sends bcast to processes 1, 5; process with rank 1 sends bcast to processes 2, 4; process with rank 5 sends bcast to process 3)

like image 598
Jarek Mazur Avatar asked Oct 05 '22 07:10

Jarek Mazur


1 Answers

It seems to be impossible and one has to create separate communicators for broadcasting. While both MPI_Graph_neighbors_count and MPI_Graph_neighbors should be enough to create new groups, one might wonder why do we need graph topologies in the first place if those groups can be created with exactly the same data as graph topology would be?

like image 169
Bartosz Ciechanowski Avatar answered Oct 10 '22 03:10

Bartosz Ciechanowski