Package mpi4py :: Module MPI :: Class Comm

[hide private]
[frames] | no frames]

# Class Comm

Communicator

Instance Methods | [hide private]

Abort(self, int errorcode=0) Terminate MPI execution environment |

Allgather(self, sendbuf, recvbuf) Gather to All, gather data from all processes and distribute it to all other processes in a group |

Allgatherv(self, sendbuf, recvbuf) 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 |

Allreduce(self, sendbuf, recvbuf, Op op=SUM) All Reduce |

Alltoall(self, sendbuf, recvbuf) All to All Scatter/Gather, send data from all to all processes in a group |

Alltoallv(self, sendbuf, recvbuf) All to All Scatter/Gather Vector, send data from all to all processes in a group providing different amount of data and displacements |

Alltoallw(self, sendbuf, recvbuf) Generalized All-to-All communication allowing different counts, displacements and datatypes for each partner |

Barrier(self) Barrier synchronization |

Bcast(self, buf, int root=0) Broadcast a message from one process to all other processes in a group |

Bsend(self, buf, int dest=0, int tag=0) Blocking send in buffered mode |

Bsend_init(self, buf, int dest=0, int tag=0) Persistent request for a send in buffered mode |

Call_errhandler(self, int errorcode) Call the error handler installed on a communicator |

Clone(self) Clone an existing communicator |

Compare(type cls, Comm comm1, Comm comm2) Compare two communicators |

Create_keyval(type cls, copy_fn=None, delete_fn=None) Create a new attribute key for communicators |

Delete_attr(self, int keyval) Delete attribute value associated with a key |

Disconnect(self) Disconnect from a communicator |

Free(self) Free a communicator |

Free_keyval(type cls, int keyval) Free and attribute key for communicators |

Gather(self, sendbuf, recvbuf, int root=0) Gather together values from a group of processes |

Gatherv(self, sendbuf, recvbuf, int root=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 |

Get_attr(self, int keyval) Retrieve attribute value by key |

Get_errhandler(self) Get the error handler for a communicator |

Get_group(self) Access the group associated with a communicator |

Get_name(self) Get the print name for this communicator |

Get_parent(type cls) Return the parent intercommunicator for this process |

Get_rank(self) Return the rank of this process in a communicator |

Get_size(self) Return the number of processes in a communicator |

Get_topology(self) Determine the type of topology (if any) associated with a communicator |

Ibsend(self, buf, int dest=0, int tag=0) Nonblocking send in buffered mode |

Iprobe(self, int source=0, int tag=0, Status status=None) Nonblocking test for a message |

Irecv(self, buf, int source=0, int tag=0) Nonblocking receive |

Irsend(self, buf, int dest=0, int tag=0) Nonblocking send in ready mode |

Is_inter(self) Test to see if a comm is an intercommunicator |

Is_intra(self) Test to see if a comm is an intracommunicator |

Isend(self, buf, int dest=0, int tag=0) Nonblocking send |

Issend(self, buf, int dest=0, int tag=0) Nonblocking send in synchronous mode |

Join(type cls, int fd) Create a intercommunicator by joining two processes connected by a socket |

Probe(self, int source=0, int tag=0, Status status=None) Blocking test for a message |

Recv(self, buf, int source=0, int tag=0, Status status=None) Blocking receive |

Recv_init(self, buf, int source=0, int tag=0) Create a persistent request for a receive |

Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0) Reduce |

Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM) Reduce-Scatter (vector version) |

Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM) Reduce-Scatter Block (regular, non-vector version) |

Rsend(self, buf, int dest=0, int tag=0) Blocking send in ready mode |

Rsend_init(self, buf, int dest=0, int tag=0) Persistent request for a send in ready mode |

Scatter(self, sendbuf, recvbuf, int root=0) Scatter data from one process to all other processes in a group |

Scatterv(self, sendbuf, recvbuf, int root=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 |

Send(self, buf, int dest=0, int tag=0) Blocking send |

Send_init(self, buf, int dest=0, int tag=0) Create a persistent request for a standard send |

Sendrecv(self, sendbuf, int dest=0, int sendtag=0, recvbuf=None, int source=0, int recvtag=0, Status status=None) Send and receive a message |

Sendrecv_replace(self, buf, int dest=0, int sendtag=0, int source=0, int recvtag=0, Status status=None) Send and receive a message |

Set_attr(self, int keyval, attrval) Store attribute value associated with a key |

Set_errhandler(self, Errhandler errhandler) Set the error handler for a communicator |

Set_name(self, name) Set the print name for this communicator |

Ssend(self, buf, int dest=0, int tag=0) Blocking send in synchronous mode |

Ssend_init(self, buf, int dest=0, int tag=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 |

allgather(self, sendobj=None, recvobj=None) Gather to All |

allreduce(self, sendobj=None, recvobj=None, op=SUM) Reduce to All |

alltoall(self, sendobj=None, recvobj=None) All to All Scatter/Gather |

barrier(self) Barrier |

bcast(self, obj=None, int root=0) Broadcast |

bsend(self, obj=None, int dest=0, int tag=0) Send in buffered mode |

f2py(type cls, arg) |

gather(self, sendobj=None, recvobj=None, int root=0) Gather |

ibsend(self, obj=None, int dest=0, int tag=0) Nonblocking send in buffered mode |

irecv(self, obj=None, int dest=0, int tag=0) |

isend(self, obj=None, int dest=0, int tag=0) Nonblocking send |

issend(self, obj=None, int dest=0, int tag=0) Nonblocking send in synchronous mode |

py2f(self) |

recv(self, obj=None, int source=0, int tag=0, Status status=None) Receive |

reduce(self, sendobj=None, recvobj=None, op=SUM, int root=0) Reduce |

scatter(self, sendobj=None, recvobj=None, int root=0) Scatter |

send(self, obj=None, int dest=0, int tag=0) Send |

sendrecv(self, sendobj=None, int dest=0, int sendtag=0, recvobj=None, int source=0, int recvtag=0, Status status=None) Send and Receive |

ssend(self, obj=None, int dest=0, int tag=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 communicator group
| is_inter is intercommunicator
| is_intra is intracommunicator
| name communicator name
| rank rank of this process in communicator
| size number of processes in communicator
| topology communicator topology type
Inherited from `object`: `__class__`

Method Details | [hide private]

### Abort(self, int errorcode=0)

Terminate MPI execution environment

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

### Probe(self, int source=0, int tag=0, Status status=None)

Blocking test for a message

This function blocks until the message arrives.

### Recv(self, buf, int source=0, int tag=0, Status status=None)

Blocking receive

This function blocks until the message is received

### Send(self, buf, int dest=0, int tag=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

### Sendrecv(self, sendbuf, int dest=0, int sendtag=0, recvbuf=None, int source=0, int recvtag=0, Status status=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.

### Sendrecv_replace(self, buf, int dest=0, int sendtag=0, int source=0, int recvtag=0, Status status=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.

### __new__(S, ...)

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