# MPI_Dist_graph_neighbors

## NAME

MPI_Dist_graph_neighbors − Provides information about adjacency in a distributed graph topology.

## SYNTAX

## C Syntax

#include <mpi.h>
int MPI_Dist_graph_neighbors(MPI_Comm comm,

|  | int maxindegree, int sources[], int sourceweights[],
|  | int maxoutdegree, int destinations[], int destweights[])

## Fortran Syntax

INCLUDE ’mpif.h’
MPI_DIST_GRAPH_NEIGHBORS(COMM, MAXINDEGREE, SOURCES, SOURCEWEIGHTS,

|  |  |  | MAXOUTDEGREE, DESTINATIONS, DESTWEIGHTS, IERROR)
|  | INTEGER |  | COMM, MAXINDEGREE, SOURCES(*), SOURCEWEIGHTS(*),
|  |  |  | MAXOUTDEGREE, DESTINATIONS(*), DESTWEIGHTS(*), IERROR

## C++ Syntax

#include <mpi.h>
void Distgraphcomm::Get_dist_neighbors(int maxindegree, int sources[], int sourceweights[],

| int maxoutdegree, int destinations[], int destweights[])

## INPUT PARAMETERS

| comm_old |  | Communicator with distributed graph topology (handle).
| maxindegree |  | Size of sources and sourceweights arrays (non-negative integer).
| maxoutdegree |  | Size of destinations and destweights arrays (non-negative integer).

## OUTPUT PARAMETERS

| sources |  | Process ranks for which this process is a destination.
| sourceweights |  | Weights of the edges into this process.
| destinations |  | Process ranks for which this process is a source.
| destweights |  | Weights of the edges out of this process.
| IERROR |  | Fortran only: Error status (integer). |

## FOR MORE INFORMATION

For more information, see page 264 of the MPI 2.2 standard.

MPI API Index