Re: [AMBER-Developers] MPI Communicator creation

From: <dcerutti.rci.rutgers.edu>
Date: Sun, 15 Jan 2012 21:55:30 -0500 (EST)

Well, shucks. Looks like I still don't understand this. At least, I can
better define the problem, but I'm still not sure why I'm getting it.
I've devised a scheme within mdgx to keep messages from getting crossed in
TI and (in the future) replica exchange. The message tag numbering seems
to be able to support what I had, which means that the tags are getting
assigned properly between senders and receivers, and they're all unique
with room for as many as 200,000,000 CPUs. But when I try to fold in
unique communicators for each cell grid (each of the end points in TI, or
each replica, gets its own cell grid) the code stalls.

The attached toy code illustrates the problem. It's an enhanced version
of the example program at
http://mpi.deino.net/mpi_functions/MPI_Comm_create.html. The output is
the following:

Created com -2080374777 on process 0
Created com -2080374780 on process 1
Created com -2080374780 on process 2
Created com -2080374780 on process 3

(This shows the initial contents of junk integer arrays on each process)

myints on 0: [ 0 0 0 0];
myints on 1: [ 1 1 1 1];
myints on 2: [ 2 2 2 2];
myints on 3: [ 3 3 3 3];

(This is where the message from process 3 -> 1 gets passed)

myints on 0: [ 0 0 0 0];
myints on 1: [ 3 3 3 3];
myints on 2: [ 2 2 2 2];
myints on 3: [ 3 3 3 3];

(This is where the code stalls)

So, the message from process 3 gets passed to 1 successfully, because they
both agree on the handle to the new communicator world_comm. But, when I
ty to pass a message from process 2 to 0 over world_comm, those two
processes don't agree on the handle so it never gets through. What I
don't understand is that I've passed the same inputs to all threads and
created world_comm at the same time. Why do three (in fact, all but the
master process) agree on the handle to world_comm whereas the master
process itself does not?

If anyone can explain that to me, I think I'm off and running with
communicators.

Dave


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers

Received on Sun Jan 15 2012 - 19:00:02 PST
Custom Search