Repository navigation
Conversation
…y helper Core sources are registered once and compiled into an OBJECT library per variant, which later lets one configure build a serial core and one MPI core per ABI family. Assisted-by: Pi:claude-opus-5-5
comm_serial.cpp and comm_mpi.cpp define get_mpi_comm and init_comm_bridge; each module compiles one, so the template needs no MPI guards. Assisted-by: Pi:claude-opus-5-5
monoprop.MPI_ABIS lists the MPI ABI families the installation was built for, classified from the preprocessed mpi.h at configure time, which also rejects MPI implementations below monoprop's version floors (Open MPI 4.1, MPICH 4.0, Intel MPI 2021.0, MVAPICH 3.0, Cray MPICH 8.1). The MPI-2 C++ bindings are disabled. BREAKING CHANGE: monoprop.has_mpi is removed; use bool(monoprop.MPI_ABIS). Assisted-by: Pi:claude-opus-5-5
Assisted-by: Pi:claude-opus-5-5
…mmunicator Every build ships a serial _core; MPI builds add _core_mpi.<abi> in a separate nanobind domain. monoprop._backend serves comm=None from _core and loads the MPI module matching mpi4py's ABI family on first use, after checking mpi4py.MPI.get_vendor() against monoprop's version floors. libmonoprop is serial in every build. BREAKING CHANGE: comm=None now always runs serially; MPI builds no longer fall back to MPI_COMM_WORLD. In MPI builds, monoprop::monoprop is serial until the MPI component lands. Assisted-by: Pi:claude-opus-5-5
…y wheel Assisted-by: Pi:claude-opus-5-5
…omponent Each MPI ABI family gets libmonoprop_mpi_<abi>; find_package(monoprop COMPONENTS MPI) classifies the consumer's mpi.h and provides monoprop::monoprop_mpi, or fails naming the ABI. BREAKING CHANGE: monoprop::monoprop is serial in every build; MPI consumers use COMPONENTS MPI and monoprop::monoprop_mpi. Assisted-by: Pi:claude-opus-5-5
monoprop.mpi-abis takes <abi>=<prefix> entries and builds each variant against that prefix without compiler wrappers, checking the prefix's mpi.h matches the declared ABI. Under cibuildwheel the extensions drop build-machine RPATHs; macOS MPI binaries search the usual MPI prefixes. Assisted-by: Pi:claude-opus-5-5
Assisted-by: Pi:claude-opus-5-5
cibuildwheel builds _core_mpi.mpich and _core_mpi.openmpi against the PyPI mpich 5.0.2 and openmpi 5.0.11 packages, keeps MPI out of the repaired wheel, audits it with check_wheel.py, and runs the MPI suite against each PyPI MPI. Assisted-by: Pi:claude-opus-5-5
Assisted-by: Pi:claude-opus-5-5
…w MPI A test-wheels job installs the wheels next to the supported version floors (Ubuntu 22.04's Open MPI 4.1.2 and MPICH 4.0 with source-built and PyPI mpi4py, Intel MPI 2021.1.1), the latest Intel MPI and Homebrew Open MPI, runs configure's MPI inspection on the floor headers, the MPI suite and a C++ consumer, and gates publishing. Assisted-by: Pi:claude-opus-5-5
Assisted-by: Pi:claude-opus-5-5
Assisted-by: Pi:claude-opus-5-5
… wheel build on wheel-only changes Assisted-by: Pi:claude-opus-5-5
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
robertodr
added this pull request to stack #427
October 24, 2026 12:13
|
Docs preview: https://pr-426.monoprop-docs.pages.dev |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/scikit-build-config-settings #426 +/- ##
=====================================================================
- Coverage 97.99% 97.45% -0.54%
=====================================================================
Files 14 15 +1
Lines 797 865 +68
Branches 111 120 +9
=====================================================================
+ Hits 781 843 +62
- Misses 11 16 +5
- Partials 5 6 +1
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



🤖 AI text below 🤖
Summary
This PR publishes MPI-enabled
monopropwheels that work with the MPI library already installed on the user's machine. They don't bundle MPI, and they don't require the MPI-5 standard ABI. The approach follows mpi4py's wheels (cibw/,_mpiabi.py). We build one extension per MPI ABI family, identified by the library's soname:mpich(libmpi.so.12): MPICH, Intel MPI, MVAPICH and Cray MPICH.openmpi(libmpi.so.40).mpiabi(libmpi_abi.so.1): built and tested locally, not shipped yet. It is waiting for an mpi4py release that uses it.monoprop loads the variant matching the family mpi4py is using.
How it works at runtime. Every build ships a serial
monoprop._core. MPI builds addmonoprop._core_mpi.<abi>, in a separate nanobind domain.comm=Nonealways runs serially. Importingmonopropnever imports mpi4py or initializes MPI.C++ SDK. The SDK in the wheel gains
libmonoprop_mpi_<abi>.find_package(monoprop CONFIG COMPONENTS MPI)selects it to match the consumer's MPI.Design spec and implementation plan:
docs/superpowers/specs/2026-10-23-mpi-wheels-design.mdanddocs/superpowers/plans/2026-10-23-mpi-wheels.md. They are not part of this PR and can be shared on request.Stacked on #421. The base branch is
feat/scikit-build-config-settings.Breaking changes:
monoprop.has_mpiis removed. Usebool(monoprop.MPI_ABIS).comm=Nonenow always runs serially. MPI builds used to fall back toMPI_COMM_WORLD.monoprop::monopropis serial in every build. MPI C++ consumers useCOMPONENTS MPIandmonoprop::monoprop_mpi.Changes
cmake/custom/monopropCore.cmake).cmake/custom/monopropMPIABI.cmakereads the ABI family and vendor version from thempi.hmacros (-E -dM) and enforces the minimum versions. It is installed for consumers too.cmake/custom/monopropMPI.cmakefinds MPI either with FindMPI (dev builds) or frommonoprop.mpi-abis<abi>=<prefix>entries (wheel builds).CIBUILDWHEEL=1, the wheel keeps no RPATHs from the build machine.comm_serial.cppandcomm_mpi.cpp, sobindings.cpp.inno longer needs#ifdefs.monoprop_add_python_corebuilds_coreand_core_mpi.<abi>.monoprop._backend(core_module,detect_mpi4py_abi,check_mpi_version) and the publicmonoprop.MPI_ABIS.MPIUnavailableError,MPIAbiMismatchError,MPIVersionError.core_module(comm).tools/cibw/install-mpi.shinstalls PyPImpich==5.0.2andopenmpi==5.0.11to build against.repair-wheel.shexcludes MPI from auditwheel/delocate, then runscheck_wheel.py. The audit checks MPI linkage per variant, RPATHs (including empty entries), that no MPI library is bundled, and that_mpi_abis.pylists exactly the shipped modules.run-tests.sh/test-wheel-mpi.shrun the serial suite, then the MPI suite against each MPI from PyPI.test-wheelsdeploy job, which also gates publishing. It covers:impi-rt==2021.1.1;mpi: mpichandbuild-depsinputs.just test-wheelandjust inspect-mpi.just test-find-packageadds an MPI leg and a check that an ABI mismatch fails at configure time.getting-started,building(COMPONENTS MPImigration, release-wheel reproduction),parallelism(backend selection, supported versions), andtesting(testing release wheels).Verification so far
mpimarker suite at 1, 2 and 4 ranks;find_packageconsumer, serial and MPI on 2 ranks.@rpath), linux-arm, abi3audit, and thetest-wheelsfloor jobs.Checklist
docs/,CONTRIBUTING.md) if neededCHANGELOG/ release notes updated if applicable (breaking changes are in the commit footers, for the release notes)AI/LLM disclosure
Assisted-bytrailer.Important
By opening this PR I confirm that I have read CONTRIBUTING.md and I agree to the terms of the Contributor License Agreement.
Warning
If you're contributing on behalf of your employer, contact cla@algorithmiq.fi to arrange a Corporate CLA.