Package mpi4py :: Module MPI :: Class Comm
[hide private]
[frames] | no frames]

Class Comm


Communicator
Instance Methods [hide private]
NoReturn
Abort(self, errorcode: int= 0)
Terminate MPI execution environment
None
Allgather(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpecB)
Gather to All, gather data from all processes and distribute it to all other processes in a group
None
Allgatherv(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpecV)
Gather to All Vector, gather data from all processes and distribute it to all other processes in a group providing different amount of data and displacements
None
Allreduce(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpec, op: Op= SUM)
Reduce to All
None
Alltoall(self, sendbuf: UnionBufSpecB=..., InPlace=..., recvbuf: BufSpecB)
All to All Scatter/Gather, send data from all to all processes in a group
None
Alltoallv(self, sendbuf: UnionBufSpecV=..., InPlace=..., recvbuf: BufSpecV)
All to All Scatter/Gather Vector, send data from all to all processes in a group providing different amount of data and displacements
None
Alltoallw(self, sendbuf: UnionBufSpecW=..., InPlace=..., recvbuf: BufSpecW)
Generalized All-to-All communication allowing different counts, displacements and datatypes for each partner
None
Barrier(self)
Barrier synchronization
None
Bcast(self, buf: BufSpec, root: int= 0)
Broadcast a message from one process to all other processes in a group
None
Bsend(self, buf: BufSpec, dest: int, tag: int= 0)
Blocking send in buffered mode
Request
Bsend_init(self, buf: BufSpec, dest: int, tag: int= 0)
Persistent request for a send in buffered mode
None
Call_errhandler(self, errorcode: int)
Call the error handler installed on a communicator
Comm
Clone(self)
Clone an existing communicator
int
Compare(cls, comm1: Comm, comm2: Comm)
Compare two communicators
Comm
Create(self, group: Group)
Create communicator from group
Comm
Create_group(self, group: Group, tag: int= 0)
Create communicator from group
int
Create_keyval(cls, copy_fn: OptionalCallableComm=...=..., int=...=..., Any=...=..., Any=... = None, delete_fn: OptionalCallableComm=...=..., int=...=..., Any=...=..., None=... = None, nopython: bool= False)
Create a new attribute key for communicators
None
Delete_attr(self, keyval: int)
Delete attribute value associated with a key
None
Disconnect(self)
Disconnect from a communicator
Comm
Dup(self, info: OptionalInfo=... = None)
Duplicate an existing communicator
Comm
Dup_with_info(self, info: Info)
Duplicate an existing communicator
None
Free(self)
Free a communicator
int
Free_keyval(cls, keyval: int)
Free an attribute key for communicators
None
Gather(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpecB=..., root: int= 0)
Gather together values from a group of processes
None
Gatherv(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpecV=..., root: int= 0)
Gather Vector, gather data to one process from all other processes in a group providing different amount of data and displacements at the receiving sides
Optional[Union[int, Any]]
Get_attr(self, keyval: int)
Retrieve attribute value by key
Errhandler
Get_errhandler(self)
Get the error handler for a communicator
Group
Get_group(self)
Access the group associated with a communicator
Info
Get_info(self)
Return the hints for a communicator that are currently in use
str
Get_name(self)
Get the print name for this communicator
Intercomm
Get_parent(cls)
Return the parent intercommunicator for this process
int
Get_rank(self)
Return the rank of this process in a communicator
int
Get_size(self)
Return the number of processes in a communicator
int
Get_topology(self)
Determine the type of topology (if any) associated with a communicator
Request
Iallgather(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpecB)
Nonblocking Gather to All
Request
Iallgatherv(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpecV)
Nonblocking Gather to All Vector
Request
Iallreduce(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpec, op: Op= SUM)
Nonblocking Reduce to All
Request
Ialltoall(self, sendbuf: UnionBufSpecB=..., InPlace=..., recvbuf: BufSpecB)
Nonblocking All to All Scatter/Gather
Request
Ialltoallv(self, sendbuf: UnionBufSpecV=..., InPlace=..., recvbuf: BufSpecV)
Nonblocking All to All Scatter/Gather Vector
Request
Ialltoallw(self, sendbuf: UnionBufSpecW=..., InPlace=..., recvbuf: BufSpecW)
Nonblocking Generalized All-to-All
Request
Ibarrier(self)
Nonblocking Barrier
Request
Ibcast(self, buf: BufSpec, root: int= 0)
Nonblocking Broadcast
Request
Ibsend(self, buf: BufSpec, dest: int, tag: int= 0)
Nonblocking send in buffered mode
Tuple[Comm, Request]
Idup(self)
Nonblocking duplicate an existing communicator
Request
Igather(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpecB=..., root: int= 0)
Nonblocking Gather
Request
Igatherv(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpecV=..., root: int= 0)
Nonblocking Gather Vector
Optional[Message]
Improbe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Nonblocking test for a matched message
bool
Iprobe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Nonblocking test for a message
Request
Irecv(self, buf: BufSpec, source: int= ANY_SOURCE, tag: int= ANY_TAG)
Nonblocking receive
Request
Ireduce(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpec=..., op: Op= SUM, root: int= 0)
Nonblocking Reduce to Root
Request
Ireduce_scatter(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpec, recvcounts: OptionalSequenceint=... = None, op: Op= SUM)
Nonblocking Reduce-Scatter (vector version)
Request
Ireduce_scatter_block(self, sendbuf: UnionBufSpecB=..., InPlace=..., recvbuf: UnionBufSpec=..., BufSpecB=..., op: Op= SUM)
Nonblocking Reduce-Scatter Block (regular, non-vector version)
Request
Irsend(self, buf: BufSpec, dest: int, tag: int= 0)
Nonblocking send in ready mode
bool
Is_inter(self)
Test to see if a comm is an intercommunicator
bool
Is_intra(self)
Test to see if a comm is an intracommunicator
Request
Iscatter(self, sendbuf: OptionalBufSpecB=..., recvbuf: UnionBufSpec=..., InPlace=..., root: int= 0)
Nonblocking Scatter
Request
Iscatterv(self, sendbuf: OptionalBufSpecV=..., recvbuf: UnionBufSpec=..., InPlace=..., root: int= 0)
Nonblocking Scatter Vector
Request
Isend(self, buf: BufSpec, dest: int, tag: int= 0)
Nonblocking send
Request
Issend(self, buf: BufSpec, dest: int, tag: int= 0)
Nonblocking send in synchronous mode
Intercomm
Join(cls, fd: int)
Create a intercommunicator by joining two processes connected by a socket
Message
Mprobe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Blocking test for a matched message
Literal[True]
Probe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Blocking test for a message
None
Recv(self, buf: BufSpec, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Blocking receive
Prequest
Recv_init(self, buf: BufSpec, source: int= ANY_SOURCE, tag: int= ANY_TAG)
Create a persistent request for a receive
None
Reduce(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: OptionalBufSpec=..., op: Op= SUM, root: int= 0)
Reduce to Root
None
Reduce_scatter(self, sendbuf: UnionBufSpec=..., InPlace=..., recvbuf: BufSpec, recvcounts: OptionalSequenceint=... = None, op: Op= SUM)
Reduce-Scatter (vector version)
None
Reduce_scatter_block(self, sendbuf: UnionBufSpecB=..., InPlace=..., recvbuf: UnionBufSpec=..., BufSpecB=..., op: Op= SUM)
Reduce-Scatter Block (regular, non-vector version)
None
Rsend(self, buf: BufSpec, dest: int, tag: int= 0)
Blocking send in ready mode
Request
Rsend_init(self, buf: BufSpec, dest: int, tag: int= 0)
Persistent request for a send in ready mode
None
Scatter(self, sendbuf: OptionalBufSpecB=..., recvbuf: UnionBufSpec=..., InPlace=..., root: int= 0)
Scatter data from one process to all other processes in a group
None
Scatterv(self, sendbuf: OptionalBufSpecV=..., recvbuf: UnionBufSpec=..., InPlace=..., root: int= 0)
Scatter Vector, scatter data from one process to all other processes in a group providing different amount of data and displacements at the sending side
None
Send(self, buf: BufSpec, dest: int, tag: int= 0)
Blocking send
Prequest
Send_init(self, buf: BufSpec, dest: int, tag: int= 0)
Create a persistent request for a standard send
None
Sendrecv(self, sendbuf: BufSpec, dest: int, sendtag: int= 0, recvbuf: BufSpec= None, source: int= ANY_SOURCE, recvtag: int= ANY_TAG, status: OptionalStatus=... = None)
Send and receive a message
None
Sendrecv_replace(self, buf: BufSpec, dest: int, sendtag: int= 0, source: int= ANY_SOURCE, recvtag: int= ANY_TAG, status: OptionalStatus=... = None)
Send and receive a message
None
Set_attr(self, keyval: int, attrval: Any)
Store attribute value associated with a key
None
Set_errhandler(self, errhandler: Errhandler)
Set the error handler for a communicator
None
Set_info(self, info: Info)
Set new values for the hints associated with a communicator
None
Set_name(self, name: str)
Set the print name for this communicator
Comm
Split(self, color: int= 0, key: int= 0)
Split communicator by color and key
Comm
Split_type(self, split_type: int, key: int= 0, info: Info= INFO_NULL)
Split communicator by split type
None
Ssend(self, buf: BufSpec, dest: int, tag: int= 0)
Blocking send in synchronous mode
Request
Ssend_init(self, buf: BufSpec, dest: int, tag: int= 0)
Persistent request for a send in synchronous mode
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
List[Any]
allgather(self, sendobj: Any)
Gather to All
Any
allreduce(self, sendobj: Any, op: UnionOp=..., CallableAny=...=..., Any=...=..., Any=... = SUM)
Reduce to All
List[Any]
alltoall(self, sendobj: SequenceAny=...)
All to All Scatter/Gather
None
barrier(self)
Barrier
Any
bcast(self, obj: Any, root: int= 0)
Broadcast
None
bsend(self, obj: Any, dest: int, tag: int= 0)
Send in buffered mode
Comm
f2py(cls, arg: int)
Optional[List[Any]]
gather(self, sendobj: Any, root: int= 0)
Gather
Request
ibsend(self, obj: Any, dest: int, tag: int= 0)
Nonblocking send in buffered mode
Optional[Message]
improbe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Nonblocking test for a matched message
bool
iprobe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Nonblocking test for a message
Request
irecv(self, buf: OptionalBuffer=... = None, source: int= ANY_SOURCE, tag: int= ANY_TAG)
Nonblocking receive
Request
isend(self, obj: Any, dest: int, tag: int= 0)
Nonblocking send
Request
issend(self, obj: Any, dest: int, tag: int= 0)
Nonblocking send in synchronous mode
Message
mprobe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Blocking test for a matched message
Literal[True]
probe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Blocking test for a message
int
py2f(self)
Any
recv(self, buf: OptionalBuffer=... = None, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)
Receive
Optional[Any]
reduce(self, sendobj: Any, op: UnionOp=..., CallableAny=...=..., Any=...=..., Any=... = SUM, root: int= 0)
Reduce to Root
Any
scatter(self, sendobj: SequenceAny=..., root: int= 0)
Scatter
None
send(self, obj: Any, dest: int, tag: int= 0)
Send
Any
sendrecv(self, sendobj: Any, dest: int, sendtag: int= 0, recvbuf: OptionalBuffer=... = None, source: int= ANY_SOURCE, recvtag: int= ANY_TAG, status: OptionalStatus=... = None)
Send and Receive
None
ssend(self, obj: Any, dest: int, tag: int= 0)
Send in synchronous mode

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  group
Comm.group: Group communicator group
  info
Comm.info: Info communicator info
  is_inter
Comm.is_inter: bool is intercommunicator
  is_intra
Comm.is_intra: bool is intracommunicator
  is_topo
Comm.is_topo: bool is a topology communicator
  name
Comm.name: str communicator name
  rank
Comm.rank: int rank of this process in communicator
  size
Comm.size: int number of processes in communicator
  topology
Comm.topology: int communicator topology type

Inherited from object: __class__

Method Details [hide private]

Abort(self, errorcode: int= 0)

 

Terminate MPI execution environment

This is a direct call, use it with care!!!.
Returns: NoReturn

Probe(self, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)

 

Blocking test for a message

This function blocks until the message arrives.
Returns: Literal[True]

Recv(self, buf: BufSpec, source: int= ANY_SOURCE, tag: int= ANY_TAG, status: OptionalStatus=... = None)

 

Blocking receive

This function blocks until the message is received
Returns: None

Send(self, buf: BufSpec, dest: int, tag: int= 0)

 

Blocking send

This function may block until the message is received. Whether or not Send blocks depends on several factors and is implementation dependent
Returns: None

Sendrecv(self, sendbuf: BufSpec, dest: int, sendtag: int= 0, recvbuf: BufSpec= None, source: int= ANY_SOURCE, recvtag: int= ANY_TAG, status: OptionalStatus=... = None)

 

Send and receive a message

This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock.A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock.
Returns: None

Sendrecv_replace(self, buf: BufSpec, dest: int, sendtag: int= 0, source: int= ANY_SOURCE, recvtag: int= ANY_TAG, status: OptionalStatus=... = None)

 

Send and receive a message

This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock.A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock.
Returns: None

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__