MPI_GRAPH_NEIGHBORS, MPI_Graph_neighbors Purpose Returns the neighbors of the given task. C synopsis #include MPI_Graph_neighbors(MPI_Comm comm,int rank,int maxneighbors,int *neighbors); C++ synopsis #include mpi.h void MPI::Graphcomm::Get_neighbors(int rank, int maxneighbors, int neighbors[]) const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_GRAPH_NEIGHBORS(MPI_COMM COMM,INTEGER RANK,INTEGER MAXNEIGHBORS, INTEGER NNEIGHBORS(*),INTEGER IERROR) Parameters comm is a communicator with graph topology (handle) (IN) rank is the rank of a task within group of comm (integer) (IN) maxneighbors is the size of array neighbors (integer) (IN) neighbors is the ranks of tasks that are neighbors of the specified task (array of integer) (OUT) IERROR is the FORTRAN return code. It is always the last argument. Description This subroutine retrieves the adjacency information for a particular task. Errors Invalid array size maxneighbors < 0 Invalid rank rank < 0 or rank > groupsize MPI not initialized MPI already finalized Invalid communicator No topology Invalid topology type no graph topology associate with communicator Related information MPI_GRAPH_CREATE