Funktionsübersicht
. .
Virtuelle Topologien
Hilfesystem für den Message Passing Interface Standard MPI
MPI_Graphdims_get
Liefert die Anzahl der Knoten und Kanten einer Graphtopologie
Syntax:
MPI_Graphdims_get( comm, nnodes, nedges )
Input Parameter:
comm - Kommunikator mit Graphtopologie (handle)
Output Parameter:
nnodes - Anzahl der Knoten im Graph (integer)
Das ist gleichzeitig die Anzahl der Prozesse in comm
nedges - Anzahl der Kanten im Graph (integer)
Aufruf:
#include "mpi.h"
int nnodes, nedges;
int *index, *edges;
MPI_Comm comm;
...
MPI_Graphdims_get( comm, &nnodes, &nedges);
index=(int *)malloc( nnodes*sizeof(int));
edges=(int *)malloc( nedges*sizeof(int));
MPI_Graph_get( comm, nnodes, nedges, index, edges);
...
Beispiel