mpi4py.MPI.Intracomm

class mpi4py.MPI.Intracomm(comm=None)

Bases: Comm

Intracommunicator

Parameters:

comm (Optional[Intracomm])

Return type:

Intracomm

static __new__(cls, comm=None)
Parameters:

comm (Optional[Intracomm])

Return type:

Intracomm

Methods Summary

Accept(port_name[, info, root])

Accept a request to form a new intercommunicator

Cart_map(dims[, periods])

Return an optimal placement for the calling process on the physical machine

Connect(port_name[, info, root])

Make a request to form a new intercommunicator

Create_cart(dims[, periods, reorder])

Create cartesian communicator

Create_dist_graph(sources, degrees, destinations)

Create distributed graph communicator

Create_dist_graph_adjacent(sources, destinations)

Create distributed graph communicator

Create_graph(index, edges[, reorder])

Create graph communicator

Create_intercomm(local_leader, peer_comm, ...)

Create intercommunicator

Exscan(sendbuf, recvbuf[, op])

Exclusive Scan

Graph_map(index, edges)

Return an optimal placement for the calling process on the physical machine

Iexscan(sendbuf, recvbuf[, op])

Inclusive Scan

Iscan(sendbuf, recvbuf[, op])

Inclusive Scan

Scan(sendbuf, recvbuf[, op])

Inclusive Scan

Spawn(command[, args, maxprocs, info, root, ...])

Spawn instances of a single MPI application

Spawn_multiple(command[, args, maxprocs, ...])

Spawn instances of multiple MPI applications

exscan(sendobj[, op])

Exclusive Scan

scan(sendobj[, op])

Inclusive Scan

Methods Documentation

Accept(port_name, info=INFO_NULL, root=0)

Accept a request to form a new intercommunicator

Parameters:
Return type:

Intercomm

Cart_map(dims, periods=None)

Return an optimal placement for the calling process on the physical machine

Parameters:
  • dims (Sequence[int])

  • periods (Optional[Sequence[bool]])

Return type:

int

Connect(port_name, info=INFO_NULL, root=0)

Make a request to form a new intercommunicator

Parameters:
Return type:

Intercomm

Create_cart(dims, periods=None, reorder=False)

Create cartesian communicator

Parameters:
  • dims (Sequence[int])

  • periods (Optional[Sequence[bool]])

  • reorder (bool)

Return type:

Cartcomm

Create_dist_graph(sources, degrees, destinations, weights=None, info=INFO_NULL, reorder=False)

Create distributed graph communicator

Parameters:
  • sources (Sequence[int])

  • degrees (Sequence[int])

  • destinations (Sequence[int])

  • weights (Optional[Sequence[int]])

  • info (Info)

  • reorder (bool)

Return type:

Distgraphcomm

Create_dist_graph_adjacent(sources, destinations, sourceweights=None, destweights=None, info=INFO_NULL, reorder=False)

Create distributed graph communicator

Parameters:
  • sources (Sequence[int])

  • destinations (Sequence[int])

  • sourceweights (Optional[Sequence[int]])

  • destweights (Optional[Sequence[int]])

  • info (Info)

  • reorder (bool)

Return type:

Distgraphcomm

Create_graph(index, edges, reorder=False)

Create graph communicator

Parameters:
  • index (Sequence[int])

  • edges (Sequence[int])

  • reorder (bool)

Return type:

Graphcomm

Create_intercomm(local_leader, peer_comm, remote_leader, tag=0)

Create intercommunicator

Parameters:
Return type:

Intercomm

Exscan(sendbuf, recvbuf, op=SUM)

Exclusive Scan

Parameters:
  • sendbuf (Union[BufSpec, InPlace])

  • recvbuf (BufSpec)

  • op (Op)

Return type:

None

Graph_map(index, edges)

Return an optimal placement for the calling process on the physical machine

Parameters:
  • index (Sequence[int])

  • edges (Sequence[int])

Return type:

int

Iexscan(sendbuf, recvbuf, op=SUM)

Inclusive Scan

Parameters:
  • sendbuf (Union[BufSpec, InPlace])

  • recvbuf (BufSpec)

  • op (Op)

Return type:

Request

Iscan(sendbuf, recvbuf, op=SUM)

Inclusive Scan

Parameters:
  • sendbuf (Union[BufSpec, InPlace])

  • recvbuf (BufSpec)

  • op (Op)

Return type:

Request

Scan(sendbuf, recvbuf, op=SUM)

Inclusive Scan

Parameters:
  • sendbuf (Union[BufSpec, InPlace])

  • recvbuf (BufSpec)

  • op (Op)

Return type:

None

Spawn(command, args=None, maxprocs=1, info=INFO_NULL, root=0, errcodes=None)

Spawn instances of a single MPI application

Parameters:
  • command (str)

  • args (Optional[Sequence[str]])

  • maxprocs (int)

  • info (Info)

  • root (int)

  • errcodes (Optional[list])

Return type:

Intercomm

Spawn_multiple(command, args=None, maxprocs=None, info=INFO_NULL, root=0, errcodes=None)

Spawn instances of multiple MPI applications

Parameters:
  • command (Sequence[str])

  • args (Optional[Sequence[Sequence[str]]])

  • maxprocs (Optional[Sequence[int]])

  • info (Union[Info, Sequence[Info]])

  • root (int)

  • errcodes (Optional[list])

Return type:

Intercomm

exscan(sendobj, op=SUM)

Exclusive Scan

Parameters:
  • sendobj (Any)

  • op (Union[Op, Callable[[Any, Any], Any]])

Return type:

Any

scan(sendobj, op=SUM)

Inclusive Scan

Parameters:
  • sendobj (Any)

  • op (Union[Op, Callable[[Any, Any], Any]])

Return type:

Any