Recent Releases of mpi4py
mpi4py - 4.1.0
New features:
- Publish binary wheel packages on PyPI with support for multiple operating systems (Linux, macOS, Windows), processor architectures (AMD64, ARM64), MPI implementations (MPICH, Open MPI, and their ABI-compatible derivatives), and Python implementations (CPython, PyPy).
- Add support for the MPI 5.0 standard.
- MPI handle serialization with integral values.
- Fixed-size Fortran
LOGICALdatatypes. - Query ABI version/info and Fortran ABI info.
-
MPI.Datatype.Create_contiguousnow uses BigMPI\'s approach when using MPI implementations that do not yet support the MPI 4.0 large-count APIs. - Add support for
MPI.FLOAT16_TandMPI.BFLOAT16_Tdatatypes. These datatypes are not yet standard but available as extensions in MPI implementations. - Add
MPI.Status.tomemoryto expose the status contents as amemoryviewobject.
Enhancements:
- Support (opt-in via
MPI4PY_BUILD_PYSABI) for building withPy_LIMITED_APIunder Python 3.10+ (requires Cython 3.1+). - Support (opt-in via
MPI4PY_BUILD_MPIABI) for building with the MPI 5.0 standard ABI and the MPICH or Open MPI legacy ABIs. TheMPIextension module will be able to dynamically link at runtime with older versions (down to the MPI 3.0 standard) of the MPI implementation used at compile time. Only available on Linux, macOS, and Windows. - Support a
buffersizeparameter in theMPIPoolExecutor.map()andMPIPoolExecutor.starmap()methods to limit the number of pending tasks. - Improve ownership management of DLPack capsules.
- Reimplement MPI DLL search path on Windows.
- Minor fixes to typing stubs and documentation.
- Support (opt-in via
Backward-incompatible changes:
- Python 3.8+ is required.
- The
MPI.Exceptionclass is now a heap type. - The types of the
MPI.BOTTOM,MPI.IN_PLACE, andMPI.BUFFER_AUTOMATICare no longer subclasses ofint.
- Python
Published by dalcinl 8 months ago
mpi4py - 4.0.1
Update support for Python 3.13:
- Enable Cython 3.1 support for free-threaded CPython.
- Allow compiling Cython-generated C sources with the full Python C-API.
- Fix MPI DLL path workarounds on Windows after changes to
locals().
Enhancements to test suite:
- Support XML reports via
unittest-xml-reporting. - Add command line options to exclude tests by patterns and files.
- Refactor Python 2 code to use Python 3 constructs using
pyupgrade.
- Support XML reports via
Miscellaneous:
- Minor and mostly inconsequential subclass fix in
mpi4py.util.pkl5. - Update compatibility workarounds for legacy MPICH 3.0 release.
- Minor and mostly inconsequential subclass fix in
- Python
Published by dalcinl over 1 year ago
mpi4py - 4.0.0
New features:
- Add support for the MPI-4.0 standard.
- Use large count MPI-4 routines.
- Add persistent collective communication.
- Add partitioned point-to-point communication.
- Add new communicator constructors.
- Add the
Sessionclass and its methods. - Add support for the MPI-4.1 standard.
- Add non-destructive completion test for multiple requests.
- Add value-index datatype constructor.
- Add communicator/session buffer attach/detach/flush.
- Support for removal of error classes/codes/strings.
- Support for querying hardware resource information.
- Add preliminary support for the upcoming MPI-5.0 standard.
- User-level failure mitigation (ULFM).
mpi4py.util.pool: New drop-in replacement formultiprocessing.pool.mpi4py.util.sync: New synchronization utilities.- Add runtime check for mismatch between
mpiexecand MPI library. - Support scikit-build-core as an alternative build backend.
- Support meson-python as an alternative build backend.
Enhancements:
mpi4py.futures: Support for parallel tasks.mpi4py.futures: Report exception tracebacks in workers.mpi4py.util.pkl5: Add support for collective communication.- Add methods
Datatype.fromcode(),Datatype.tocode()and attributesDatatype.typestr,Datatype.typecharto simplify NumPy interoperability for simple cases. - Add methods
Comm.Create_errhandler(),Win.Create_errhandler(), andFile.Create_errhandler()to create custom error handlers. - Add support for pickle serialization of instances of MPI types.
All instances of
Datatype,Info, andStatuscan be serialized. Instances ofOpcan be serialized only if created throughmpi4pyby callingOp.Create(). Instances of other MPI types can be serialized only if they reference predefined handles. - Add
handleattribute andfromhandle()class method to MPI classes to ease interoperability with external code. The handle value is an unsigned integer guaranteed to fit on the platform'suintptr_tC type. - Add lowercase
free()method to MPI classes to ease MPI object deallocation and cleanup. This method eventually attempts to callFree(), but only if the object's MPI handle is not a null or predefined handle, and such call is allowed within the World Model init/finalize.
Backward-incompatible changes:
- Python 2 is no longer supported, Python 3.6+ is required, but typing stubs are supported for Python 3.8+.
- The
Intracomm.Create_group()method is no longer defined in the baseCommclass. Group.Compare()andComm.Compare()are no longer class methods but instance methods. Existing codes using the former class methods are expected to continue working.Group.Translate_ranks()is no longer a class method but an instance method. Existing codes using the former class method are expected to continue working.- The
LBandUBdatatypes are no longer available, useDatatype.Create_resized()instead. - The
HOSTpredefined attribute key is no longer available. - The
MPI.memoryclass has been renamed toMPI.buffer. The old name is still available as an alias to the new name. - The
mpi4py.dlmodule is no longer available. - The
mpi4py.get_configfunction returns an empty dictionary.
Miscellaneous:
- The project is now licensed under the BSD-3-Clause license. This change is fairly inconsequential for users and distributors. It simply adds an additional clause against using contributor names for promotional purposes without their consent.
- Add a new guidelines section to documentation laying out new fair
play rules. These rules ask companies and outside developers to
refrain from reusing the
mpi4pyname in unaffiliated projects, publishing binary mpi4py wheels on the main Python Package Index (PyPI), and distributing modified versions with incompatible or extended API changes. The primary motivation of these rules is to avoid fragmentation and end-user confusion.
- Python
Published by dalcinl over 1 year ago
mpi4py - 3.1.2
WARNING: This is the last release supporting Python 2.
mpi4py.futures: Add_max_workersproperty toMPIPoolExecutor.mpi4py.util.dtlib: Fix computation of alignment for predefined datatypes.mpi4py.util.pkl5: Fix deadlock when usingssend()+mprobe().mpi4py.util.pkl5: Add environment variableMPI4PY_PICKLE_THRESHOLD.mpi4py.rc: Interpret"y"and"n"strings as boolean values.Fix/add typemap/typestr for
MPI.WCHAR/MPI.COUNTdatatypes.Minor fixes and additions to documentation.
Minor fixes to typing support.
Support for local version identifier (PEP-440).
- Python
Published by dalcinl over 4 years ago
mpi4py - 3.1.0
WARNING: This is the last release supporting Python 2.
New features:
mpi4py.util: New package collecting miscellaneous utilities.
Enhancements:
- Add pickle-based
Request.waitsome()andRequest.testsome(). - Add lowercase methods
Request.get_status()andRequest.cancel(). - Support for passing Python GPU arrays compliant with the
DLPack_ data interchange mechanism (link) and the__cuda_array_interface__(CAI) standard (link) to uppercase methods. This support requires that mpi4py is built against CUDA-aware MPI implementations. This feature is currently experimental and subject to future changes. mpi4py.futures: Add support for initializers and canceling futures at shutdown. Environment variables names now follow the patternMPI4PY_FUTURES_*, the previousMPI4PY_*names are deprecated.- Add type annotations to Cython code. The first line of the docstring of functions and methods displays a signature including type annotations.
- Add companion stub files to support type checkers.
- Support for weak references.
- Add pickle-based
Miscellaneous:
- Add a new mpi4py publication (link) to the citation listing.
- Python
Published by dalcinl over 4 years ago
mpi4py - 3.0.2
Bug fixes:
- Fix handling of readonly buffers in support for Python 2 legacy buffer interface. The issue triggers only when using a buffer-like object that is readonly and does not export the new Python 3 buffer interface.
- Fix build issues with Open MPI 4.0.x series related to removal of many MPI-1 symbols deprecated in MPI-2 and removed in MPI-3.
- Minor documentation fixes.
- Python
Published by dalcinl over 5 years ago
mpi4py - 3.0.1
Bug fixes:
- Fix
Comm.scatter()and other collectives corrupting input send list. Add safety measures to prevent related issues in global reduction operations. - Fix error-checking code for counts in
Op.Reduce_local().
- Fix
Enhancements:
- Map size-specific Python/NumPy typecodes to MPI datatypes.
- Allow partial specification of target list/tuple arguments in the
various
WinRMA methods. - Workaround for removal of
MPI_{LB|UB}in Open MPI 4.0. - Support for Microsoft MPI v10.0.
- Python
Published by dalcinl over 5 years ago
mpi4py - 3.0.0
New features:
mpi4py.futures: Execute computations asynchronously using a pool of MPI processes. This package is based onconcurrent.futuresfrom the Python standard library.mpi4py.run: Run Python code and abort execution in case of unhandled exceptions to prevent deadlocks.mpi4py.bench: Run basic MPI benchmarks and tests.
Enhancements:
- Lowercase, pickle-based collective communication calls are now thread-safe through the use of fine-grained locking.
- The
MPImodule now exposes amemorytype which is a lightweight variant of the builtinmemoryviewtype, but exposes both the legacy Python 2 and the modern Python 3 buffer interface under a Python 2 runtime. - The
MPI.Comm.Alltoallw()method now usescount=1anddispl=0as defaults, assuming that messages are specified through user-defined datatypes. - The
Request.Wait[all]()methods now returnTrueto match the interface ofRequest.Test[all](). - The
Winclass now implements the Python buffer interface.
Backward-incompatible changes:
- The
bufargument of theMPI.Comm.recv()method is deprecated, passing anything butNoneemits a warning. - The
MPI.Win.memoryproperty was removed, use theMPI.Win.tomemory()method instead. - Executing
python -m mpi4pyin the command line is now equivalent topython -m mpi4py.run. For the former behavior, usepython -m mpi4py.bench. - Python 2.6 and 3.2 are no longer supported. The
mpi4py.MPImodule may still build and partially work, but other pure-Python modules under thempi4pynamespace will not. - Windows: Remove support for legacy MPICH2, Open MPI, and DeinoMPI.
- The
- Python
Published by dalcinl over 5 years ago
mpi4py - 2.0.0
Support for MPI-3 features.
- Matched probes and receives.
- Nonblocking collectives.
- Neighborhood collectives.
- New communicator constructors.
- Request-based RMA operations.
- New RMA communication and synchronisation calls.
- New window constructors.
- New datatype constructor.
- New C++ boolean and floating complex datatypes.
Support for MPI-2 features not included in previous releases.
- Generalized All-to-All collective (
Comm.Alltoallw()) - User-defined data representations (
Register_datarep())
- Generalized All-to-All collective (
New scalable implementation of reduction operations for Python objects. This code is based on binomial tree algorithms using point-to-point communication and duplicated communicator contexts. To disable this feature, use
mpi4py.rc.fast_reduce = False.Backward-incompatible changes:
- Python 2.4, 2.5, 3.0 and 3.1 are no longer supported.
- Default MPI error handling policies are overriden. After import,
mpi4py sets the
ERRORS_RETURNerror handler inCOMM_SELFandCOMM_WORLD, as well as any newComm,Win, orFileinstance created through mpi4py, thus effectively ignoring the MPI rules about error handler inheritance. This way, MPI errors translate to Python exceptions. To disable this behavior and use the standard MPI error handling rules, usempi4py.rc.errors = 'default'. - Change signature of all send methods,
destis a required argument. - Change signature of all receive and probe methods,
sourcedefaults toANY_SOURCE,tagdefaults toANY_TAG. - Change signature of send lowercase-spelling methods,
objarguments are not mandatory. - Change signature of recv lowercase-spelling methods, renamed 'obj' arguments to 'buf'.
- Change
Request.Waitsome()andRequest.Testsome()to returnNoneorlist. - Change signature of all lowercase-spelling collectives,
sendobjarguments are now mandatory,recvobjarguments were removed. - Reduction operations
MAXLOCandMINLOCare no longer special-cased in lowercase-spelling methodsComm.[all]reduce()andComm.[ex]scan(), the input object must be specified as a tuple(obj, location). - Change signature of name publishing functions.
The new signatures are
Publish_name(service_name, port_name, info=INFO_NULL)andUnpublish_name(service_name, port_name, info=INFO_NULL)`. Wininstances now cache Python objects exposing memory by keeping references instead of using MPI attribute caching.- Change signature of
Win.Lock(). The new signature isWin.Lock(rank, lock_type=LOCK_EXCLUSIVE, assertion=0). - Move
Cartcomm.Map()toIntracomm.Cart_map(). - Move
Graphcomm.Map()toIntracomm.Graph_map(). - Remove the
mpi4py.MPEmodule. - Rename the Cython definition file for use with
cimportstatement frommpi_c.pxdtolibmpi.pxd.
- Python
Published by dalcinl over 5 years ago
mpi4py - 1.3.1
Regenerate C wrappers with Cython 0.19.1 to support Python 3.3.
Install
*.pxdfiles in<site-packages>/mpi4pyto ease the support for Cython'scimportstatement in code requiring to access mpi4py internals.As a side-effect of using Cython 0.19.1, ancient Python 2.3 is no longer supported. If you really need it, you can install an older Cython and run
python setup.py build_src --force.
- Python
Published by dalcinl over 5 years ago