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

Module MPI

Message Passing Interface.
Classes [hide private]
  Cartcomm
Cartesian topology intracommunicator
  Comm
Communicator
  Datatype
Datatype object
  Distgraphcomm
Distributed graph topology intracommunicator
  Errhandler
Error handler
  Exception
Exception class
  File
File handle
  Graphcomm
General graph topology intracommunicator
  Grequest
Generalized request handle
  Group
Group of processes
  Info
Info object
  Intercomm
Intercommunicator
  Intracomm
Intracommunicator
  Message
Matched message handle
  Op
Operation object
  Pickle
Pickle(dumps: Optional[Callable[[Any, int], bytes]] = None, loads: Optional[Callable[[Buffer], Any]] = None, protocol: Optional[int] = None) -> None
  Prequest
Persistent request handle
  Request
Request handle
  Status
Status object
  Topocomm
Topology intracommunicator
  Win
Window handle
  memory
Memory buffer
Functions [hide private]
int
Add_error_class()
Add an error class to the known error classes
int
Add_error_code(errorclass: int)
Add an error code to an error class
None
Add_error_string(errorcode: int, string: str)
Associate an error string with an error class or errorcode
int
Aint_add(base: int, disp: int)
Return the sum of base address and displacement
int
Aint_diff(addr1: int, addr2: int)
Return the difference between absolute addresses
memory
Alloc_mem(size: int, info: Info= INFO_NULL)
Allocate memory for message passing and RMA
None
Attach_buffer(buf: Buffer)
Attach a user-provided buffer for sending in buffered mode
None
Close_port(port_name: str)
Close a port
List[int]
Compute_dims(nnodes: int, dims: Unionint=..., Sequenceint=...)
Return a balanced distribution of processes per coordinate direction
Buffer
Detach_buffer()
Remove an existing attached buffer
None
Finalize()
Terminate the MPI execution environment
None
Free_mem(mem: memory)
Free memory allocated with Alloc_mem()
int
Get_address(location: UnionBuffer=..., Bottom=...)
Get the address of a location in memory
int
Get_error_class(errorcode: int)
Convert an error code into an error class
str
Get_error_string(errorcode: int)
Return the error string for a given error class or error code
str
Get_library_version()
Obtain the version string of the MPI library
str
Get_processor_name()
Obtain the name of the calling processor
Tuple[int, int]
Get_version()
Obtain the version number of the MPI standard supported by the implementation as a tuple (version, subversion)
None
Init()
Initialize the MPI execution environment
int
Init_thread(required: int= THREAD_MULTIPLE)
Initialize the MPI execution environment
bool
Is_finalized()
Indicates whether Finalize has completed
bool
Is_initialized()
Indicates whether Init has been called
bool
Is_thread_main()
Indicate whether this thread called Init or Init_thread
str
Lookup_name(service_name: str, info: Info= INFO_NULL)
Lookup a port name given a service name
str
Open_port(info: Info= INFO_NULL)
Return an address that can be used to establish connections between groups of MPI processes
None
Pcontrol(level: int)
Control profiling
None
Publish_name(service_name: str, port_name: str, info: Info= INFO_NULL)
Publish a service name
int
Query_thread()
Return the level of thread support provided by the MPI library
None
Register_datarep(datarep: str, read_fn: CallableBuffer=..., Datatype=..., int=..., Buffer=..., int=..., None=..., write_fn: CallableBuffer=..., Datatype=..., int=..., Buffer=..., int=..., None=..., extent_fn: CallableDatatype=..., int=...)
Register user-defined data representations
None
Unpublish_name(service_name: str, port_name: str, info: Info= INFO_NULL)
Unpublish a service name
float
Wtick()
Return the resolution of Wtime
float
Wtime()
Return an elapsed time on the calling processor
int
_addressof(arg: Any)
Memory address of the underlying MPI handle
Lock
_comm_lock(comm: Comm, key: Hashable= None)
Create/get communicator lock
Dict[Hashable, Lock]
_comm_lock_table(comm: Comm)
Internal communicator lock table
Tuple[Intercomm, int, Intracomm, bool]
_commctx_inter(comm: Intercomm)
Create/get intercommunicator duplicate
Tuple[Intracomm, int]
_commctx_intra(comm: Intracomm)
Create/get intracommunicator duplicate
int
_handleof(arg: Any)
Unsigned integer value with the underlying MPI handle
Dict[Hashable, Lock]
_lock_table(comm: Comm)
Internal communicator lock table
None
_set_abort_status(status: Any)
Helper for python -m mpi4py.run ...
int
_sizeof(arg: Any)
Size in bytes of the underlying MPI handle
Optional[str]
_typecode(datatype: Datatype)
Map MPI datatype to typecode string
Tuple[str, Tuple[int, int, int]]
get_vendor()
Infomation about the underlying MPI implementation
Variables [hide private]
  AINT = <mpi4py.MPI.Datatype object at 0x7fee1c2f55a0>
  ANY_SOURCE = -32766
  ANY_TAG = -32766
  APPNUM = 0
  BAND = <mpi4py.MPI.Op object at 0x7fee1c2f6530>
  BOOL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5930>
  BOR = <mpi4py.MPI.Op object at 0x7fee1c2f65b0>
  BOTTOM = BOTTOM
  BSEND_OVERHEAD = 0
  BXOR = <mpi4py.MPI.Op object at 0x7fee1c2f6630>
  BYTE = <mpi4py.MPI.Datatype object at 0x7fee1c2f5570>
  CART = -32766
  CHAR = <mpi4py.MPI.Datatype object at 0x7fee1c2f5630>
  CHARACTER = <mpi4py.MPI.Datatype object at 0x7fee1c2f5d80>
  COMBINER_CONTIGUOUS = -32766
  COMBINER_DARRAY = -32766
  COMBINER_DUP = -32766
  COMBINER_F90_COMPLEX = -32766
  COMBINER_F90_INTEGER = -32766
  COMBINER_F90_REAL = -32766
  COMBINER_HINDEXED = -32766
  COMBINER_HINDEXED_BLOCK = -32766
  COMBINER_HVECTOR = -32766
  COMBINER_INDEXED = -32766
  COMBINER_INDEXED_BLOCK = -32766
  COMBINER_NAMED = -32766
  COMBINER_RESIZED = -32766
  COMBINER_STRUCT = -32766
  COMBINER_SUBARRAY = -32766
  COMBINER_VECTOR = -32766
  COMM_NULL = <mpi4py.MPI.Comm object at 0x7fee1c2f9330>
  COMM_SELF = <mpi4py.MPI.Intracomm object at 0x7fee1c2f9360>
  COMM_TYPE_SHARED = -32766
  COMM_WORLD = <mpi4py.MPI.Intracomm object at 0x7fee1c2f9390>
  COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ea0>
  COMPLEX16 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9180>
  COMPLEX32 = <mpi4py.MPI.Datatype object at 0x7fee1c2f91b0>
  COMPLEX4 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9120>
  COMPLEX8 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9150>
  CONGRUENT = 2
  COUNT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5600>
  CXX_BOOL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5bd0>
  CXX_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f...
  CXX_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5...
  CXX_LONG_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fe...
  C_BOOL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5930>
  C_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5b10>
  C_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5b70>
  C_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5b40>
  C_LONG_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1...
  DATATYPE_NULL = <mpi4py.MPI.Datatype object at 0x7fee1c2f54b0>
  DISPLACEMENT_CURRENT = 3
  DISP_CUR = 3
  DISTRIBUTE_BLOCK = 1
  DISTRIBUTE_CYCLIC = 2
  DISTRIBUTE_DFLT_DARG = 4
  DISTRIBUTE_NONE = 0
  DIST_GRAPH = -32766
  DOUBLE = <mpi4py.MPI.Datatype object at 0x7fee1c2f58d0>
  DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e70>
  DOUBLE_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5d20>
  DOUBLE_PRECISION = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e40>
  ERRHANDLER_NULL = <mpi4py.MPI.Errhandler object at 0x7fee1c2f9...
  ERRORS_ARE_FATAL = <mpi4py.MPI.Errhandler object at 0x7fee1c2f...
  ERRORS_RETURN = <mpi4py.MPI.Errhandler object at 0x7fee1c2f92d0>
  ERR_ACCESS = 1
  ERR_AMODE = 1
  ERR_ARG = 1
  ERR_ASSERT = 1
  ERR_BAD_FILE = 1
  ERR_BASE = 1
  ERR_BUFFER = 1
  ERR_COMM = 1
  ERR_CONVERSION = 1
  ERR_COUNT = 1
  ERR_DIMS = 1
  ERR_DISP = 1
  ERR_DUP_DATAREP = 1
  ERR_FILE = 1
  ERR_FILE_EXISTS = 1
  ERR_FILE_IN_USE = 1
  ERR_GROUP = 1
  ERR_INFO = 1
  ERR_INFO_KEY = 1
  ERR_INFO_NOKEY = 1
  ERR_INFO_VALUE = 1
  ERR_INTERN = 1
  ERR_IN_STATUS = 1
  ERR_IO = 1
  ERR_KEYVAL = 1
  ERR_LASTCODE = 1
  ERR_LOCKTYPE = 1
  ERR_NAME = 1
  ERR_NOT_SAME = 1
  ERR_NO_MEM = 1
  ERR_NO_SPACE = 1
  ERR_NO_SUCH_FILE = 1
  ERR_OP = 1
  ERR_OTHER = 1
  ERR_PENDING = 1
  ERR_PORT = 1
  ERR_QUOTA = 1
  ERR_RANK = 1
  ERR_READ_ONLY = 1
  ERR_REQUEST = 1
  ERR_RMA_ATTACH = 1
  ERR_RMA_CONFLICT = 1
  ERR_RMA_FLAVOR = 1
  ERR_RMA_RANGE = 1
  ERR_RMA_SHARED = 1
  ERR_RMA_SYNC = 1
  ERR_ROOT = 1
  ERR_SERVICE = 1
  ERR_SIZE = 1
  ERR_SPAWN = 1
  ERR_TAG = 1
  ERR_TOPOLOGY = 1
  ERR_TRUNCATE = 1
  ERR_TYPE = 1
  ERR_UNKNOWN = 1
  ERR_UNSUPPORTED_DATAREP = 1
  ERR_UNSUPPORTED_OPERATION = 1
  ERR_WIN = 1
  FILE_NULL = <mpi4py.MPI.File object at 0x7fee1c2f93f0>
  FLOAT = <mpi4py.MPI.Datatype object at 0x7fee1c2f58a0>
  FLOAT_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5cf0>
  F_BOOL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5db0>
  F_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ea0>
  F_DOUBLE = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e40>
  F_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e70>
  F_FLOAT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e10>
  F_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ea0>
  F_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5de0>
  GRAPH = -32766
  GROUP_EMPTY = <mpi4py.MPI.Group object at 0x7fee1c2f9210>
  GROUP_NULL = <mpi4py.MPI.Group object at 0x7fee1c2f91e0>
  HOST = 0
  IDENT = 1
  INFO_ENV = <mpi4py.MPI.Info object at 0x7fee1c2f9270>
  INFO_NULL = <mpi4py.MPI.Info object at 0x7fee1c2f9240>
  INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5120>
  INT16_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5990>
  INT32_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f59c0>
  INT64_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f59f0>
  INT8_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5960>
  INTEGER = <mpi4py.MPI.Datatype object at 0x7fee1c2f5de0>
  INTEGER1 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5f90>
  INTEGER16 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9030>
  INTEGER2 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5fc0>
  INTEGER4 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5a80>
  INTEGER8 = <mpi4py.MPI.Datatype object at 0x7fee1c2f56c0>
  INT_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5cc0>
  IN_PLACE = IN_PLACE
  IO = 0
  KEYVAL_INVALID = 0
  LAND = <mpi4py.MPI.Op object at 0x7fee1c2f64f0>
  LASTUSEDCODE = 0
  LB = <mpi4py.MPI.Datatype object at 0x7fee1c2f5510>
  LOCK_EXCLUSIVE = -32766
  LOCK_SHARED = -32766
  LOGICAL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5db0>
  LOGICAL1 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ed0>
  LOGICAL2 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5f00>
  LOGICAL4 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5f30>
  LOGICAL8 = <mpi4py.MPI.Datatype object at 0x7fee1c2f5f60>
  LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f5720>
  LONG_DOUBLE = <mpi4py.MPI.Datatype object at 0x7fee1c2f5900>
  LONG_DOUBLE_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5d50>
  LONG_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ab0>
  LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f5780>
  LOR = <mpi4py.MPI.Op object at 0x7fee1c2f6570>
  LXOR = <mpi4py.MPI.Op object at 0x7fee1c2f65f0>
  MAX = <mpi4py.MPI.Op object at 0x7fee1c2f63f0>
  MAXLOC = <mpi4py.MPI.Op object at 0x7fee1c2f6670>
  MAX_DATAREP_STRING = 1
  MAX_ERROR_STRING = 1
  MAX_INFO_KEY = 1
  MAX_INFO_VAL = 1
  MAX_LIBRARY_VERSION_STRING = 8
  MAX_OBJECT_NAME = 1
  MAX_PORT_NAME = 1
  MAX_PROCESSOR_NAME = 1
  MESSAGE_NO_PROC = <mpi4py.MPI.Message object at 0x7fee1c2f7cd0>
  MESSAGE_NULL = <mpi4py.MPI.Message object at 0x7fee1c2df870>
  MIN = <mpi4py.MPI.Op object at 0x7fee1c2f6430>
  MINLOC = <mpi4py.MPI.Op object at 0x7fee1c2f66b0>
  MODE_APPEND = 128
  MODE_CREATE = 8
  MODE_DELETE_ON_CLOSE = 32
  MODE_EXCL = 16
  MODE_NOCHECK = -32766
  MODE_NOPRECEDE = -32766
  MODE_NOPUT = -32766
  MODE_NOSTORE = -32766
  MODE_NOSUCCEED = -32766
  MODE_RDONLY = 1
  MODE_RDWR = 2
  MODE_SEQUENTIAL = 256
  MODE_UNIQUE_OPEN = 64
  MODE_WRONLY = 4
  NO_OP = <mpi4py.MPI.Op object at 0x7fee1c2f6730>
  OFFSET = <mpi4py.MPI.Datatype object at 0x7fee1c2f55d0>
  OP_NULL = <mpi4py.MPI.Op object at 0x7fee1c2f63b0>
  ORDER_C = 0
  ORDER_F = 1
  ORDER_FORTRAN = 1
  PACKED = <mpi4py.MPI.Datatype object at 0x7fee1c2f5540>
  PROC_NULL = -32766
  PROD = <mpi4py.MPI.Op object at 0x7fee1c2f64b0>
  REAL = <mpi4py.MPI.Datatype object at 0x7fee1c2f5e10>
  REAL16 = <mpi4py.MPI.Datatype object at 0x7fee1c2f90f0>
  REAL2 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9060>
  REAL4 = <mpi4py.MPI.Datatype object at 0x7fee1c2f9090>
  REAL8 = <mpi4py.MPI.Datatype object at 0x7fee1c2f90c0>
  REPLACE = <mpi4py.MPI.Op object at 0x7fee1c2f66f0>
  REQUEST_NULL = <mpi4py.MPI.Request object at 0x7fee1c2df1e0>
  ROOT = -32766
  SEEK_CUR = 1
  SEEK_END = 2
  SEEK_SET = 0
  SHORT = <mpi4py.MPI.Datatype object at 0x7fee1c2f56f0>
  SHORT_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5c90>
  SIGNED_CHAR = <mpi4py.MPI.Datatype object at 0x7fee1c2f5690>
  SIGNED_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5120>
  SIGNED_LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f5720>
  SIGNED_LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f5780>
  SIGNED_SHORT = <mpi4py.MPI.Datatype object at 0x7fee1c2f56f0>
  SIMILAR = 3
  SINT16_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5990>
  SINT32_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f59c0>
  SINT64_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f59f0>
  SINT8_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5960>
  SUBVERSION = 0
  SUCCESS = 0
  SUM = <mpi4py.MPI.Op object at 0x7fee1c2f6470>
  TAG_UB = 0
  THREAD_FUNNELED = 1
  THREAD_MULTIPLE = 3
  THREAD_SERIALIZED = 2
  THREAD_SINGLE = 0
  TWOINT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5cc0>
  TYPECLASS_COMPLEX = -32766
  TYPECLASS_INTEGER = -32766
  TYPECLASS_REAL = -32766
  UB = <mpi4py.MPI.Datatype object at 0x7fee1c2f54e0>
  UINT16_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5750>
  UINT32_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5a50>
  UINT64_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5ae0>
  UINT8_T = <mpi4py.MPI.Datatype object at 0x7fee1c2f5a20>
  UNDEFINED = -32766
  UNEQUAL = 4
  UNIVERSE_SIZE = 0
  UNSIGNED = <mpi4py.MPI.Datatype object at 0x7fee1c2f5810>
  UNSIGNED_CHAR = <mpi4py.MPI.Datatype object at 0x7fee1c2f57b0>
  UNSIGNED_INT = <mpi4py.MPI.Datatype object at 0x7fee1c2f5810>
  UNSIGNED_LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f5840>
  UNSIGNED_LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fee1c2f...
  UNSIGNED_SHORT = <mpi4py.MPI.Datatype object at 0x7fee1c2f57e0>
  UNWEIGHTED = 0
  VERSION = 1
  WCHAR = <mpi4py.MPI.Datatype object at 0x7fee1c2f5660>
  WEIGHTS_EMPTY = 140660423997472
  WIN_BASE = 0
  WIN_CREATE_FLAVOR = 0
  WIN_DISP_UNIT = 0
  WIN_FLAVOR = 0
  WIN_FLAVOR_ALLOCATE = -32766
  WIN_FLAVOR_CREATE = -32766
  WIN_FLAVOR_DYNAMIC = -32766
  WIN_FLAVOR_SHARED = -32766
  WIN_MODEL = 0
  WIN_NULL = <mpi4py.MPI.Win object at 0x7fee1c2ea640>
  WIN_SEPARATE = -32766
  WIN_SIZE = 0
  WIN_UNIFIED = -32766
  WTIME_IS_GLOBAL = 0
  __pyx_capi__ = {'PyMPIComm_Get': <capsule object "MPI_Comm *(P...
  _keyval_registry = {'Comm': {}, 'Datatype': {}, 'Win': {}}
  _typedict = {}
  _typedict_c = {}
  _typedict_f = {}
  pickle = <mpi4py.MPI.Pickle object at 0x7fee1c2f7820>
Function Details [hide private]

get_vendor()

 

Infomation about the underlying MPI implementation

Returns:
  • a string with the name of the MPI implementation
  • an integer 3-tuple version (major, minor, micro)
Returns: Tuple[str, Tuple[int, int, int]]

Variables Details [hide private]

CXX_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fee1c2f5c30>

CXX_FLOAT_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fee1c2f5c00>

CXX_LONG_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fee1c2f5c60>

C_LONG_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fee1c2f5ba0>

ERRHANDLER_NULL

Value:
<mpi4py.MPI.Errhandler object at 0x7fee1c2f92a0>

ERRORS_ARE_FATAL

Value:
<mpi4py.MPI.Errhandler object at 0x7fee1c2f9300>

UNSIGNED_LONG_LONG

Value:
<mpi4py.MPI.Datatype object at 0x7fee1c2f5870>

__pyx_capi__

Value:
{'PyMPIComm_Get': <capsule object "MPI_Comm *(PyObject *)" at 0x7fee1c\
2db960>,
 'PyMPIComm_New': <capsule object "PyObject *(MPI_Comm)" at 0x7fee1c2d\
b930>,
 'PyMPIDatatype_Get': <capsule object "MPI_Datatype *(PyObject *)" at \
0x7fee1c2db600>,
 'PyMPIDatatype_New': <capsule object "PyObject *(MPI_Datatype)" at 0x\
7fee1c2db5d0>,
...