mpi4py.MPI.Graphcomm

class mpi4py.MPI.Graphcomm(comm=None)

Bases: Topocomm

General graph topology intracommunicator

Parameters

comm (Optional[Graphcomm]) –

Return type

Graphcomm

static __new__(cls, comm=None)
Parameters

comm (Optional[Graphcomm]) –

Return type

Graphcomm

Methods Summary

Get_dims()

Return the number of nodes and edges

Get_neighbors(rank)

Return list of neighbors of a process

Get_neighbors_count(rank)

Return number of neighbors of a process

Get_topo()

Return index and edges

Attributes Summary

dims

number of nodes and edges

edges

index

nedges

number of edges

neighbors

nneighbors

number of neighbors

nnodes

number of nodes

topo

topology information

Methods Documentation

Get_dims()

Return the number of nodes and edges

Return type

Tuple[int, int]

Get_neighbors(rank)

Return list of neighbors of a process

Parameters

rank (int) –

Return type

List[int]

Get_neighbors_count(rank)

Return number of neighbors of a process

Parameters

rank (int) –

Return type

int

Get_topo()

Return index and edges

Return type

Tuple[List[int], List[int]]

Attributes Documentation

dims

number of nodes and edges

edges
index
nedges

number of edges

neighbors
nneighbors

number of neighbors

nnodes

number of nodes

topo

topology information