Hello,

My name is David Souther, and I am a student working on a parallel
processing research project at Rocky Mountain College. We need to attach
topology information to our processes, but the assertions we have been
making about the MPI Topology mechanism seem to be false.

We would like to do something similar to the following:

Node 0 <---> Node 1
     |
     |
    V
Node 2

That is, Node 0 can talk to Node 1 and 2, and Node 1 can talk to Node 0, but
Node 2 can't talk to anyone. From what I understand, the code to do that
would look like:
...
MPI_Comm graph_comm;
int nodes = 3;
int indexes[] = {2, 3, 3};
int edges[] = {1, 2, 0};
MPI_Graph_create(MPI_COMM_WORLD, nodes, indexes, edges, 0, &graph_comm);
...

That is how, with my understanding, I would build that graph.

Then, the following pseudocode  would work:

if(rank == 0)
MPI_SEND("Message", To Rank 1, graph_comm)
if(rank == 1)
MPI_RECV(buffer, From Rank 0, graph_comm)

but this would not (It would throw an error, maybe?):

if(rank == 2)
MPI_SEND("Message", To Rank 0, graph_comm)
if(rank == 0)
MPI_RECV(buffer, From Rank 2, graph_comm)


Anyway, the point is, that doesn't work/happen. The messages simply send and
receive as if they were all in the global communicator (MPI_COMM_WORLD).

So, I have two questions: could (and how do I make) this work?

And, If I'm going at this entirely the wrong way, what is a good use for the
topology mechanism?

Thank you so much for your time!

-- 
-DS
-------------------------
David Souther
1511 Poly Dr
Billings, MT, 59102
(406) 545-9223
http://www.davidsouther.com

Reply via email to