Changelog¶
v0.3.0 (2026-11-20)¶
Fixes:
An exception raised by the mapped function now always propagates. With
return_results=False, it was silently discarded (#2). Formpi_simple, it is now raised on every rank, where the other ranks used to wait for the failed one forever.An unknown
moderaisesValueError, where it used to run serially, so that a typo such asmode="multiprocesing"went unnoticed. This may break code that relied on it;mode="serial"is the way to run serially.starmap_parallelon themultiprocessing,multithreadinganddaskbackends callsf(*args)for each tuple of arguments, asitertools.starmapdoes, where tuples of unequal lengths were mixed up.dask: equal arguments are no longer taken for one call whose result is reused (pure=False), and theLocalClusterandClientare closed after the call, where they were left running.return_results=Falsereturns[]whatever the mode or the number of processes; serially it returned the results.mpi_simplejoins the ranks’ results in one pass, wheresum(..., [])copied them once per rank.
New:
mode="multiinterpreter", onconcurrent.futures.InterpreterPoolExecutor(Python 3.14 on): parallel pure Python in one process.chunksize, for every backend butmpi_simpleandserial: the number of calls sent to a worker at a time, to cut the overhead when each call is quick.daskruns on the activedistributed.Clientif there is one, so on any cluster it is connected to; and withprocesses, starts that many single-threaded workers.mpipassesprocessestoMPIPoolExecutorasmax_workers, which matters when it spawns its workers (withoutpython -m mpi4py.futures).map_parallel.MODES, the valid values ofmode, and type hints (py.typed).Tested on Python 3.11 to 3.15 and on the free-threaded builds 3.13t to 3.15t, on Linux (x86-64 and ARM64), macOS (x86-64 and ARM64) and Windows (x86-64).
The docs, at https://ickc.github.io/python-map_parallel, have a page on choosing a backend.
Packaging:
Require Python 3.11 or later.
The optional dependencies are extras:
map-parallel[dask],map-parallel[mpi].Built with uv_build and released from GitHub Actions through trusted publishing; developed with pixi.
v0.2.0 (2021-06-09)¶
Add the
mpi_simplemode.
v0.1.1 (2020-11-20)¶
First release on PyPI.