mpi4py.MPI.Comm

classmpi4py.MPI.Comm

Bases:object

Communication context.

static__new__(cls,comm=None)
Parameters:

comm (Comm |None)

Return type:

Self

Methods Summary

Abort([errorcode])

Terminate the MPI execution environment.

Ack_failed([num_to_ack])

Acknowledge failures on a communicator.

Agree(flag)

Blocking agreement.

Allgather(sendbuf, recvbuf)

Gather to All.

Allgather_init(sendbuf, recvbuf[, info])

Persistent Gather to All.

Allgatherv(sendbuf, recvbuf)

Gather to All Vector.

Allgatherv_init(sendbuf, recvbuf[, info])

Persistent Gather to All Vector.

Allreduce(sendbuf, recvbuf[, op])

Reduce to All.

Allreduce_init(sendbuf, recvbuf[, op, info])

Persistent Reduce to All.

Alltoall(sendbuf, recvbuf)

All to All Scatter/Gather.

Alltoall_init(sendbuf, recvbuf[, info])

Persistent All to All Scatter/Gather.

Alltoallv(sendbuf, recvbuf)

All to All Scatter/Gather Vector.

Alltoallv_init(sendbuf, recvbuf[, info])

Persistent All to All Scatter/Gather Vector.

Alltoallw(sendbuf, recvbuf)

All to All Scatter/Gather General.

Alltoallw_init(sendbuf, recvbuf[, info])

Persistent All to All Scatter/Gather General.

Attach_buffer(buf)

Attach a user-provided buffer for sending in buffered mode.

Barrier()

Barrier synchronization.

Barrier_init([info])

Persistent Barrier.

Bcast(buf[, root])

Broadcast data from one process to all other processes.

Bcast_init(buf[, root, info])

Persistent Broadcast.

Bsend(buf, dest[, tag])

Blocking send in buffered mode.

Bsend_init(buf, dest[, tag])

Persistent request for a send in buffered mode.

Call_errhandler(errorcode)

Call the error handler installed on a communicator.

Clone()

Clone an existing communicator.

Compare(comm)

Compare two communicators.

Create(group)

Create communicator from group.

Create_errhandler(errhandler_fn)

Create a new error handler for communicators.

Create_keyval([copy_fn, delete_fn, nopython])

Create a new attribute key for communicators.

Delete_attr(keyval)

Delete attribute value associated with a key.

Detach_buffer()

Remove an existing attached buffer.

Disconnect()

Disconnect from a communicator.

Dup([info])

Duplicate a communicator.

Dup_with_info(info)

Duplicate a communicator with hints.

Flush_buffer()

Block until all buffered messages have been transmitted.

Free()

Free a communicator.

Free_keyval(keyval)

Free an attribute key for communicators.

Gather(sendbuf, recvbuf[, root])

Gather data to one process from all other processes.

Gather_init(sendbuf, recvbuf[, root, info])

Persistent Gather.

Gatherv(sendbuf, recvbuf[, root])

Gather Vector.

Gatherv_init(sendbuf, recvbuf[, root, info])

Persistent Gather Vector.

Get_attr(keyval)

Retrieve attribute value by key.

Get_errhandler()

Get the error handler for a communicator.

Get_failed()

Extract the group of failed processes.

Get_group()

Access the group associated with a communicator.

Get_info()

Return the current hints for a communicator.

Get_name()

Get the print name for this communicator.

Get_parent()

Return the parent intercommunicator for this process.

Get_rank()

Return the rank of this process in a communicator.

Get_size()

Return the number of processes in a communicator.

Get_topology()

Return the type of topology (if any) associated with a communicator.

Iagree(flag)

Nonblocking agreement.

Iallgather(sendbuf, recvbuf)

Nonblocking Gather to All.

Iallgatherv(sendbuf, recvbuf)

Nonblocking Gather to All Vector.

Iallreduce(sendbuf, recvbuf[, op])

Nonblocking Reduce to All.

Ialltoall(sendbuf, recvbuf)

Nonblocking All to All Scatter/Gather.

Ialltoallv(sendbuf, recvbuf)

Nonblocking All to All Scatter/Gather Vector.

Ialltoallw(sendbuf, recvbuf)

Nonblocking All to All Scatter/Gather General.

Ibarrier()

Nonblocking Barrier.

Ibcast(buf[, root])

Nonblocking Broadcast.

Ibsend(buf, dest[, tag])

Nonblocking send in buffered mode.

Idup([info])

Nonblocking duplicate a communicator.

Idup_with_info(info)

Nonblocking duplicate a communicator with hints.

Iflush_buffer()

Nonblocking flush for buffered messages.

Igather(sendbuf, recvbuf[, root])

Nonblocking Gather.

Igatherv(sendbuf, recvbuf[, root])

Nonblocking Gather Vector.

Improbe([source, tag, status])

Nonblocking test for a matched message.

Iprobe([source, tag, status])

Nonblocking test for a message.

Irecv(buf[, source, tag])

Nonblocking receive.

Ireduce(sendbuf, recvbuf[, op, root])

Nonblocking Reduce to Root.

Ireduce_scatter(sendbuf, recvbuf[, ...])

Nonblocking Reduce-Scatter (vector version).

Ireduce_scatter_block(sendbuf, recvbuf[, op])

Nonblocking Reduce-Scatter Block (regular, non-vector version).

Irsend(buf, dest[, tag])

Nonblocking send in ready mode.

Is_inter()

Return whether the communicator is an intercommunicator.

Is_intra()

Return whether the communicator is an intracommunicator.

Is_revoked()

Indicate whether the communicator has been revoked.

Iscatter(sendbuf, recvbuf[, root])

Nonblocking Scatter.

Iscatterv(sendbuf, recvbuf[, root])

Nonblocking Scatter Vector.

Isend(buf, dest[, tag])

Nonblocking send.

Isendrecv(sendbuf, dest[, sendtag, recvbuf, ...])

Nonblocking send and receive.

Isendrecv_replace(buf, dest[, sendtag, ...])

Send and receive a message.

Ishrink()

Nonblocking shrink a communicator to remove all failed processes.

Issend(buf, dest[, tag])

Nonblocking send in synchronous mode.

Join(fd)

Interconnect two processes connected by a socket.

Mprobe([source, tag, status])

Blocking test for a matched message.

Precv_init(buf, partitions[, source, tag, info])

Create request for a partitioned recv operation.

Probe([source, tag, status])

Blocking test for a message.

Psend_init(buf, partitions, dest[, tag, info])

Create request for a partitioned send operation.

Recv(buf[, source, tag, status])

Blocking receive.

Recv_init(buf[, source, tag])

Create a persistent request for a receive.

Reduce(sendbuf, recvbuf[, op, root])

Reduce to Root.

Reduce_init(sendbuf, recvbuf[, op, root, info])

Persistent Reduce to Root.

Reduce_scatter(sendbuf, recvbuf[, ...])

Reduce-Scatter (vector version).

Reduce_scatter_block(sendbuf, recvbuf[, op])

Reduce-Scatter Block (regular, non-vector version).

Reduce_scatter_block_init(sendbuf, recvbuf)

Persistent Reduce-Scatter Block (regular, non-vector version).

Reduce_scatter_init(sendbuf, recvbuf[, ...])

Persistent Reduce-Scatter (vector version).

Revoke()

Revoke a communicator.

Rsend(buf, dest[, tag])

Blocking send in ready mode.

Rsend_init(buf, dest[, tag])

Persistent request for a send in ready mode.

Scatter(sendbuf, recvbuf[, root])

Scatter data from one process to all other processes.

Scatter_init(sendbuf, recvbuf[, root, info])

Persistent Scatter.

Scatterv(sendbuf, recvbuf[, root])

Scatter Vector.

Scatterv_init(sendbuf, recvbuf[, root, info])

Persistent Scatter Vector.

Send(buf, dest[, tag])

Blocking send.

Send_init(buf, dest[, tag])

Create a persistent request for a standard send.

Sendrecv(sendbuf, dest[, sendtag, recvbuf, ...])

Send and receive a message.

Sendrecv_replace(buf, dest[, sendtag, ...])

Send and receive a message.

Set_attr(keyval, attrval)

Store attribute value associated with a key.

Set_errhandler(errhandler)

Set the error handler for a communicator.

Set_info(info)

Set new values for the hints associated with a communicator.

Set_name(name)

Set the print name for this communicator.

Shrink()

Shrink a communicator to remove all failed processes.

Split([color, key])

Split communicator by color and key.

Split_type(split_type[, key, info])

Split communicator by split type.

Ssend(buf, dest[, tag])

Blocking send in synchronous mode.

Ssend_init(buf, dest[, tag])

Persistent request for a send in synchronous mode.

allgather(sendobj)

Gather to All.

allreduce(sendobj[, op])

Reduce to All.

alltoall(sendobj)

All to All Scatter/Gather.

barrier()

Barrier synchronization.

bcast(obj[, root])

Broadcast.

bsend(obj, dest[, tag])

Send in buffered mode.

f2py(arg)

free()

CallFree if not null or predefined.

fromhandle(handle)

Create object from MPI handle.

fromint(arg, /)

Translate integer handle to object.

gather(sendobj[, root])

Gather.

ibsend(obj, dest[, tag])

Nonblocking send in buffered mode.

improbe([source, tag, status])

Nonblocking test for a matched message.

iprobe([source, tag, status])

Nonblocking test for a message.

irecv([buf, source, tag])

Nonblocking receive.

isend(obj, dest[, tag])

Nonblocking send.

issend(obj, dest[, tag])

Nonblocking send in synchronous mode.

mprobe([source, tag, status])

Blocking test for a matched message.

probe([source, tag, status])

Blocking test for a message.

py2f()

recv([buf, source, tag, status])

Receive.

reduce(sendobj[, op, root])

Reduce to Root.

scatter(sendobj[, root])

Scatter.

send(obj, dest[, tag])

Send in standard mode.

sendrecv(sendobj, dest[, sendtag, recvbuf, ...])

Send and Receive.

ssend(obj, dest[, tag])

Send in synchronous mode.

toint()

Translate object to integer handle.

Attributes Summary

group

Group.

handle

MPI handle.

info

Info hints.

is_inter

Is intercommunicator.

is_intra

Is intracommunicator.

is_topo

Is a topology.

name

Print name.

rank

Rank of this process.

size

Number of processes.

topology

Topology type.

Methods Documentation

Abort(errorcode=0)

Terminate the MPI execution environment.

Warning

The invocation of this method prevents the execution ofvarious Python exit and cleanup mechanisms. Use this method as alast resort to prevent parallel deadlocks in case of unrecoverableerrors.

Parameters:

errorcode (int)

Return type:

NoReturn

Ack_failed(num_to_ack=None)

Acknowledge failures on a communicator.

Parameters:

num_to_ack (int |None)

Return type:

int

Agree(flag)

Blocking agreement.

Parameters:

flag (int)

Return type:

int

Allgather(sendbuf,recvbuf)

Gather to All.

Gather data from all processes and broadcast the combined data to allother processes.

Parameters:
Return type:

None

Allgather_init(sendbuf,recvbuf,info=INFO_NULL)

Persistent Gather to All.

Parameters:
Return type:

Prequest

Allgatherv(sendbuf,recvbuf)

Gather to All Vector.

Gather data from all processes and send it to all other processesproviding different amounts of data and displacements.

Parameters:
Return type:

None

Allgatherv_init(sendbuf,recvbuf,info=INFO_NULL)

Persistent Gather to All Vector.

Parameters:
Return type:

Prequest

Allreduce(sendbuf,recvbuf,op=SUM)

Reduce to All.

Parameters:
Return type:

None

Allreduce_init(sendbuf,recvbuf,op=SUM,info=INFO_NULL)

Persistent Reduce to All.

Parameters:
Return type:

Prequest

Alltoall(sendbuf,recvbuf)

All to All Scatter/Gather.

Send data to all processes and recv data from all processes.

Parameters:
Return type:

None

Alltoall_init(sendbuf,recvbuf,info=INFO_NULL)

Persistent All to All Scatter/Gather.

Parameters:
Return type:

Prequest

Alltoallv(sendbuf,recvbuf)

All to All Scatter/Gather Vector.

Send data to all processes and recv data from all processesproviding different amounts of data and displacements.

Parameters:
Return type:

None

Alltoallv_init(sendbuf,recvbuf,info=INFO_NULL)

Persistent All to All Scatter/Gather Vector.

Parameters:
Return type:

Prequest

Alltoallw(sendbuf,recvbuf)

All to All Scatter/Gather General.

Send/recv data to/from all processes allowing the specification ofdifferent counts, displacements, and datatypes for each dest/source.

Parameters:
Return type:

None

Alltoallw_init(sendbuf,recvbuf,info=INFO_NULL)

Persistent All to All Scatter/Gather General.

Parameters:
Return type:

Prequest

Attach_buffer(buf)

Attach a user-provided buffer for sending in buffered mode.

Parameters:

buf (Buffer |None)

Return type:

None

Barrier()

Barrier synchronization.

Return type:

None

Barrier_init(info=INFO_NULL)

Persistent Barrier.

Parameters:

info (Info)

Return type:

Prequest

Bcast(buf,root=0)

Broadcast data from one process to all other processes.

Parameters:
Return type:

None

Bcast_init(buf,root=0,info=INFO_NULL)

Persistent Broadcast.

Parameters:
Return type:

Prequest

Bsend(buf,dest,tag=0)

Blocking send in buffered mode.

Parameters:
Return type:

None

Bsend_init(buf,dest,tag=0)

Persistent request for a send in buffered mode.

Parameters:
Return type:

Request

Call_errhandler(errorcode)

Call the error handler installed on a communicator.

Parameters:

errorcode (int)

Return type:

None

Clone()

Clone an existing communicator.

Return type:

Self

Compare(comm)

Compare two communicators.

Parameters:

comm (Comm)

Return type:

int

Create(group)

Create communicator from group.

Parameters:

group (Group)

Return type:

Comm

classmethodCreate_errhandler(errhandler_fn)

Create a new error handler for communicators.

Parameters:

errhandler_fn (Callable[[Comm,int],None])

Return type:

Errhandler

classmethodCreate_keyval(copy_fn=None,delete_fn=None,nopython=False)

Create a new attribute key for communicators.

Parameters:
Return type:

int

Delete_attr(keyval)

Delete attribute value associated with a key.

Parameters:

keyval (int)

Return type:

None

Detach_buffer()

Remove an existing attached buffer.

Return type:

Buffer |None

Disconnect()

Disconnect from a communicator.

Return type:

None

Dup(info=None)

Duplicate a communicator.

Parameters:

info (Info |None)

Return type:

Self

Dup_with_info(info)

Duplicate a communicator with hints.

Parameters:

info (Info)

Return type:

Self

Flush_buffer()

Block until all buffered messages have been transmitted.

Return type:

None

Free()

Free a communicator.

Return type:

None

classmethodFree_keyval(keyval)

Free an attribute key for communicators.

Parameters:

keyval (int)

Return type:

int

Gather(sendbuf,recvbuf,root=0)

Gather data to one process from all other processes.

Parameters:
Return type:

None

Gather_init(sendbuf,recvbuf,root=0,info=INFO_NULL)

Persistent Gather.

Parameters:
Return type:

Prequest

Gatherv(sendbuf,recvbuf,root=0)

Gather Vector.

Gather data to one process from all other processesproviding different amounts of data and displacements.

Parameters:
Return type:

None

Gatherv_init(sendbuf,recvbuf,root=0,info=INFO_NULL)

Persistent Gather Vector.

Parameters:
Return type:

Prequest

Get_attr(keyval)

Retrieve attribute value by key.

Parameters:

keyval (int)

Return type:

int |Any |None

Get_errhandler()

Get the error handler for a communicator.

Return type:

Errhandler

Get_failed()

Extract the group of failed processes.

Return type:

Group

Get_group()

Access the group associated with a communicator.

Return type:

Group

Get_info()

Return the current hints for a communicator.

Return type:

Info

Get_name()

Get the print name for this communicator.

Return type:

str

classmethodGet_parent()

Return the parent intercommunicator for this process.

Return type:

Intercomm

Get_rank()

Return the rank of this process in a communicator.

Return type:

int

Get_size()

Return the number of processes in a communicator.

Return type:

int

Get_topology()

Return the type of topology (if any) associated with a communicator.

Return type:

int

Iagree(flag)

Nonblocking agreement.

Parameters:

flag (Buffer)

Return type:

Request

Iallgather(sendbuf,recvbuf)

Nonblocking Gather to All.

Parameters:
Return type:

Request

Iallgatherv(sendbuf,recvbuf)

Nonblocking Gather to All Vector.

Parameters:
Return type:

Request

Iallreduce(sendbuf,recvbuf,op=SUM)

Nonblocking Reduce to All.

Parameters:
Return type:

Request

Ialltoall(sendbuf,recvbuf)

Nonblocking All to All Scatter/Gather.

Parameters:
Return type:

Request

Ialltoallv(sendbuf,recvbuf)

Nonblocking All to All Scatter/Gather Vector.

Parameters:
Return type:

Request

Ialltoallw(sendbuf,recvbuf)

Nonblocking All to All Scatter/Gather General.

Parameters:
Return type:

Request

Ibarrier()

Nonblocking Barrier.

Return type:

Request

Ibcast(buf,root=0)

Nonblocking Broadcast.

Parameters:
Return type:

Request

Ibsend(buf,dest,tag=0)

Nonblocking send in buffered mode.

Parameters:
Return type:

Request

Idup(info=None)

Nonblocking duplicate a communicator.

Parameters:

info (Info |None)

Return type:

tuple[Self,Request]

Idup_with_info(info)

Nonblocking duplicate a communicator with hints.

Parameters:

info (Info)

Return type:

tuple[Self,Request]

Iflush_buffer()

Nonblocking flush for buffered messages.

Return type:

Request

Igather(sendbuf,recvbuf,root=0)

Nonblocking Gather.

Parameters:
Return type:

Request

Igatherv(sendbuf,recvbuf,root=0)

Nonblocking Gather Vector.

Parameters:
Return type:

Request

Improbe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Nonblocking test for a matched message.

Parameters:
Return type:

Message |None

Iprobe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Nonblocking test for a message.

Parameters:
Return type:

bool

Irecv(buf,source=ANY_SOURCE,tag=ANY_TAG)

Nonblocking receive.

Parameters:
Return type:

Request

Ireduce(sendbuf,recvbuf,op=SUM,root=0)

Nonblocking Reduce to Root.

Parameters:
Return type:

Request

Ireduce_scatter(sendbuf,recvbuf,recvcounts=None,op=SUM)

Nonblocking Reduce-Scatter (vector version).

Parameters:
Return type:

Request

Ireduce_scatter_block(sendbuf,recvbuf,op=SUM)

Nonblocking Reduce-Scatter Block (regular, non-vector version).

Parameters:
Return type:

Request

Irsend(buf,dest,tag=0)

Nonblocking send in ready mode.

Parameters:
Return type:

Request

Is_inter()

Return whether the communicator is an intercommunicator.

Return type:

bool

Is_intra()

Return whether the communicator is an intracommunicator.

Return type:

bool

Is_revoked()

Indicate whether the communicator has been revoked.

Return type:

bool

Iscatter(sendbuf,recvbuf,root=0)

Nonblocking Scatter.

Parameters:
Return type:

Request

Iscatterv(sendbuf,recvbuf,root=0)

Nonblocking Scatter Vector.

Parameters:
Return type:

Request

Isend(buf,dest,tag=0)

Nonblocking send.

Parameters:
Return type:

Request

Isendrecv(sendbuf,dest,sendtag=0,recvbuf=None,source=ANY_SOURCE,recvtag=ANY_TAG)

Nonblocking send and receive.

Parameters:
Return type:

Request

Isendrecv_replace(buf,dest,sendtag=0,source=ANY_SOURCE,recvtag=ANY_TAG)

Send and receive a message.

Note

This function is guaranteed not to deadlock in situationswhere pairs of blocking sends and receives may deadlock.

Caution

A common mistake when using this function is to mismatchthe tags with the source and destination ranks, which can result indeadlock.

Parameters:
Return type:

Request

Ishrink()

Nonblocking shrink a communicator to remove all failed processes.

Return type:

tuple[Comm,Request]

Issend(buf,dest,tag=0)

Nonblocking send in synchronous mode.

Parameters:
Return type:

Request

classmethodJoin(fd)

Interconnect two processes connected by a socket.

Parameters:

fd (int)

Return type:

Intercomm

Mprobe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Blocking test for a matched message.

Parameters:
Return type:

Message

Precv_init(buf,partitions,source=ANY_SOURCE,tag=ANY_TAG,info=INFO_NULL)

Create request for a partitioned recv operation.

Parameters:
Return type:

Prequest

Probe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Blocking test for a message.

Note

This function blocks until the message arrives.

Parameters:
Return type:

Literal[True]

Psend_init(buf,partitions,dest,tag=0,info=INFO_NULL)

Create request for a partitioned send operation.

Parameters:
Return type:

Prequest

Recv(buf,source=ANY_SOURCE,tag=ANY_TAG,status=None)

Blocking receive.

Note

This function blocks until the message is received.

Parameters:
Return type:

None

Recv_init(buf,source=ANY_SOURCE,tag=ANY_TAG)

Create a persistent request for a receive.

Parameters:
Return type:

Prequest

Reduce(sendbuf,recvbuf,op=SUM,root=0)

Reduce to Root.

Parameters:
Return type:

None

Reduce_init(sendbuf,recvbuf,op=SUM,root=0,info=INFO_NULL)

Persistent Reduce to Root.

Parameters:
Return type:

Prequest

Reduce_scatter(sendbuf,recvbuf,recvcounts=None,op=SUM)

Reduce-Scatter (vector version).

Parameters:
Return type:

None

Reduce_scatter_block(sendbuf,recvbuf,op=SUM)

Reduce-Scatter Block (regular, non-vector version).

Parameters:
Return type:

None

Reduce_scatter_block_init(sendbuf,recvbuf,op=SUM,info=INFO_NULL)

Persistent Reduce-Scatter Block (regular, non-vector version).

Parameters:
Return type:

Prequest

Reduce_scatter_init(sendbuf,recvbuf,recvcounts=None,op=SUM,info=INFO_NULL)

Persistent Reduce-Scatter (vector version).

Parameters:
Return type:

Prequest

Revoke()

Revoke a communicator.

Return type:

None

Rsend(buf,dest,tag=0)

Blocking send in ready mode.

Parameters:
Return type:

None

Rsend_init(buf,dest,tag=0)

Persistent request for a send in ready mode.

Parameters:
Return type:

Request

Scatter(sendbuf,recvbuf,root=0)

Scatter data from one process to all other processes.

Parameters:
Return type:

None

Scatter_init(sendbuf,recvbuf,root=0,info=INFO_NULL)

Persistent Scatter.

Parameters:
Return type:

Prequest

Scatterv(sendbuf,recvbuf,root=0)

Scatter Vector.

Scatter data from one process to all other processesproviding different amounts of data and displacements.

Parameters:
Return type:

None

Scatterv_init(sendbuf,recvbuf,root=0,info=INFO_NULL)

Persistent Scatter Vector.

Parameters:
Return type:

Prequest

Send(buf,dest,tag=0)

Blocking send.

Note

This function may block until the message is received.WhetherSend blocks or not depends on several factors and isimplementation dependent.

Parameters:
Return type:

None

Send_init(buf,dest,tag=0)

Create a persistent request for a standard send.

Parameters:
Return type:

Prequest

Sendrecv(sendbuf,dest,sendtag=0,recvbuf=None,source=ANY_SOURCE,recvtag=ANY_TAG,status=None)

Send and receive a message.

Note

This function is guaranteed not to deadlock in situationswhere pairs of blocking sends and receives may deadlock.

Caution

A common mistake when using this function is to mismatchthe tags with the source and destination ranks, which can result indeadlock.

Parameters:
Return type:

None

Sendrecv_replace(buf,dest,sendtag=0,source=ANY_SOURCE,recvtag=ANY_TAG,status=None)

Send and receive a message.

Note

This function is guaranteed not to deadlock in situationswhere pairs of blocking sends and receives may deadlock.

Caution

A common mistake when using this function is to mismatchthe tags with the source and destination ranks, which can result indeadlock.

Parameters:
Return type:

None

Set_attr(keyval,attrval)

Store attribute value associated with a key.

Parameters:
Return type:

None

Set_errhandler(errhandler)

Set the error handler for a communicator.

Parameters:

errhandler (Errhandler)

Return type:

None

Set_info(info)

Set new values for the hints associated with a communicator.

Parameters:

info (Info)

Return type:

None

Set_name(name)

Set the print name for this communicator.

Parameters:

name (str)

Return type:

None

Shrink()

Shrink a communicator to remove all failed processes.

Return type:

Comm

Split(color=0,key=0)

Split communicator by color and key.

Parameters:
Return type:

Comm

Split_type(split_type,key=0,info=INFO_NULL)

Split communicator by split type.

Parameters:
Return type:

Comm

Ssend(buf,dest,tag=0)

Blocking send in synchronous mode.

Parameters:
Return type:

None

Ssend_init(buf,dest,tag=0)

Persistent request for a send in synchronous mode.

Parameters:
Return type:

Request

allgather(sendobj)

Gather to All.

Parameters:

sendobj (Any)

Return type:

list[Any]

allreduce(sendobj,op=SUM)

Reduce to All.

Parameters:
Return type:

Any

alltoall(sendobj)

All to All Scatter/Gather.

Parameters:

sendobj (Sequence[Any])

Return type:

list[Any]

barrier()

Barrier synchronization.

Note

This method is equivalent toBarrier.

Return type:

None

bcast(obj,root=0)

Broadcast.

Parameters:
Return type:

Any

bsend(obj,dest,tag=0)

Send in buffered mode.

Parameters:
Return type:

None

classmethodf2py(arg)
Parameters:

arg (int)

Return type:

Comm

free()

CallFree if not null or predefined.

Return type:

None

classmethodfromhandle(handle)

Create object from MPI handle.

Parameters:

handle (int)

Return type:

Comm

classmethodfromint(arg,/)

Translate integer handle to object.

Parameters:

arg (int)

Return type:

Comm

gather(sendobj,root=0)

Gather.

Parameters:
Return type:

list[Any] |None

ibsend(obj,dest,tag=0)

Nonblocking send in buffered mode.

Parameters:
Return type:

Request

improbe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Nonblocking test for a matched message.

Parameters:
Return type:

Message |None

iprobe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Nonblocking test for a message.

Parameters:
Return type:

bool

irecv(buf=None,source=ANY_SOURCE,tag=ANY_TAG)

Nonblocking receive.

Parameters:
Return type:

Request

isend(obj,dest,tag=0)

Nonblocking send.

Parameters:
Return type:

Request

issend(obj,dest,tag=0)

Nonblocking send in synchronous mode.

Parameters:
Return type:

Request

mprobe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Blocking test for a matched message.

Parameters:
Return type:

Message

probe(source=ANY_SOURCE,tag=ANY_TAG,status=None)

Blocking test for a message.

Parameters:
Return type:

Literal[True]

py2f()
Return type:

int

recv(buf=None,source=ANY_SOURCE,tag=ANY_TAG,status=None)

Receive.

Parameters:
Return type:

Any

reduce(sendobj,op=SUM,root=0)

Reduce to Root.

Parameters:
Return type:

Any |None

scatter(sendobj,root=0)

Scatter.

Parameters:
Return type:

Any

send(obj,dest,tag=0)

Send in standard mode.

Parameters:
Return type:

None

sendrecv(sendobj,dest,sendtag=0,recvbuf=None,source=ANY_SOURCE,recvtag=ANY_TAG,status=None)

Send and Receive.

Parameters:
Return type:

Any

ssend(obj,dest,tag=0)

Send in synchronous mode.

Parameters:
Return type:

None

toint()

Translate object to integer handle.

Return type:

int

Attributes Documentation

group

Group.

handle

MPI handle.

info

Info hints.

is_inter

Is intercommunicator.

is_intra

Is intracommunicator.

is_topo

Is a topology.

name

Print name.

rank

Rank of this process.

size

Number of processes.

topology

Topology type.