On Mon, Feb 14, 2022 at 6:33 PM Neil Carlson via users < users@lists.open-mpi.org> wrote:
> I've been successful at using MPI_Dist_graph_create_adjacent to create a > new communicator with graph topology, and using it with > MPI_Neighbor_alltoallv. But I have a few questions: > > 1. Where can I use this communicator? Can it be used with the usual > stuff like MPI_Allgather, or do I need to hang onto the original > communicator (MPI_COMM_WORLD actually) for that purpose? > Anywhere a communicator is used. You just have to be careful and understand what is the scope of the communication you use them with. 2. It turns out that my graph isn't symmetric sometimes (but I think I > understood that is okay). I usually just need to send stuff in one > direction, but occasionally it needs to go in the reverse direction. Am I > right that I need a second graph communicator built with the reverse edges > to use with MPI_Neighbor_alltoallv for that communication? My testing > seems to indicate so, but I'm not absolutely certain. > If the symmetry is statically defined then you should use a single communicator. However, if the symmetry is defined based on some conditions that change during the execution then you will need 2 communicators, and use them accordingly to your needs. > 3. Is there any real advantage to using the non-symmetric graph, or should > I just symmetrize it and use the one? > Reducing communications would be a good reason to use a non-symmetric graph. But clearly if you are saving a small fraction of your overall communication volume this might not be as critical as having a readable code. George. > > Thanks for your help! >