MPI_Dist_graph_neighbors function - Message Passing Interface (original) (raw)

Returns the list of neighbors having edges into and out of the calling process, as well as the corresponding weights on the incoming and outgoing edges in a distributed graph topology.

Syntax

int WINAPI MPI_Dist_graph_neighbors(
  _In_ MPI_Comm              comm,
       _In_range_(>=,0)  int maxindegree,
       _Out_writes_opt int   sources[],
       _Out_writes_opt int   sourceweights[],
       _In_range_(>=,0)  int maxoutdegree,
       _Out_writes_opt int   destinations[],
       _Out_writes_opt int   destweights[]
);

Parameters

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

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

The incoming and outgoing edge count and the weight information can be obtained by calling MPI_Dist_graph_neighbors_count prior to calling this method. If maxindegree and maxoutdegree are less than the number of incoming and outgoing edges returned by MPI_Dist_graph_neighbors_count, then only the first part of the full list is returned.

The incoming and outgoing edge weights are returned only if the graph was created as a weighted distributed graph by the MPI_Dist_graph_create_adjacent or the MPI_Dist_graph_create methods and if MPI_UNWEIGHTED is not supplied as an argument in place of sourceweights or destweights.

Requirements

Product Microsoft MPI v6
Header Mpi.h; Mpif.h
Library Msmpi.lib
DLL Msmpi.dll

See also

MPI Process Topology Functions

MPI_Dist_graph_create

MPI_Dist_graph_neighbors_count

MPI_Dist_graph_create_adjacent