It depends on what you are trying to do. Is your network physically
wired such that there is no direct link between nodes 1 and 2? (i.e.,
node 1 cannot directly send to node 2, such as via opening a socket
from node 1 to node 2's IP address)
MPI topology communicators do not prohibit on process from sending to
any other process in the communicator. They might provide more
optimal routing for nearest-neighbor communication if the underlying
network topology supports it, for example.
On Jan 24, 2008, at 6:42 PM, David Souther wrote:
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
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users
--
Jeff Squyres
Cisco Systems