The Numba-MPI package enables just-in-time (JIT) compiled Python code using Numba to call Message Passing Interface (MPI) routines directly, allowing parallel communication without leaving compiled execution blocks. Designed as a lightweight, NumPy-based wrapper around the MPI C API, it provides cross-platform high-performance communication capabilities, bridging the gap between Python productivity and native MPI efficiency. We have outlined the project design, features and performance in a SoftwareX paper (Derlatka, Manna, Bulenok, Zwicker & Arabas 2024).
Numba-MPI has been developed by an open group of developers from Jagiellonian University in Kraków, from the Max Planck Institute (MPI-DS) in Göttingen, from our team at the AGH University of Krakow, Poland, with much appreciated contributions from the users' community.
Numba-MPI is an optional dependency of py-pde and PyMPDATA-MPI.
MPI_Type_create_struct (mapping to NumPy structured arrays)boundscheck, fastmath, nogil, cache or error_model)MPI_IN_PLACE in [all]gather/scatter and allreduceMPI_ERROR_CLASS