Am 05.06.2012 um 15:39 schrieb Mudassar Majeed:
> Let say there are N MPI processes. Each MPI process has to communicate with some T processes, where T < N. This information is a directed graph (and every process knows only about its own). I need to convert it to undirected graph, so that each process will inform T other processes about it. Every process will update this information. (that may be stored in an array of maximum size N). What can be the best way to exchange this information among all MPI processes ? MPI_AllGather and MPI_AllGatherv do not solve my problem.
I'm not sure whether I understand the problem in the correct way: in principle you want to gather all information maybe to the rank 0 process from each process, and then broadcast the complete information to all processes.
Why is MPI_AllGather not working for you then? Each element needs to be a vector with the index of the targeted T processes flagged. Each of the T processes have to look then into the received vectors (from all processes) whether they are mentioned there. Each of the T processes can be targeted by more than one of the N processes?