Add submodule mpi - #40
Open
wdeconinck wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds MPI communicator management and interoperability to the atlas4py Python bindings.
Changes:
- Adds communicator bindings, registration, scoping, splitting, and mpi4py conversion.
- Adds Atlas version parsing and conditional compilation support.
- Adds MPI binding tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_bindings.py |
Tests MPI APIs and interoperability. |
src/atlas4py/mpi/_mpi.hpp |
Declares MPI wrappers. |
src/atlas4py/mpi/_mpi.cpp |
Implements and binds MPI functionality. |
src/atlas4py/CMakeLists.txt |
Builds the MPI binding sources. |
src/atlas4py/cmake/atlas4py_parse_version.cmake |
Parses version components. |
src/atlas4py/cmake/atlas4py_add_atlas.cmake |
Integrates Atlas version detection. |
src/atlas4py/_atlas4py.cpp |
Registers the MPI submodule. |
Suppressed comments (1)
tests/test_bindings.py:497
- The repository runs this suite with plain
pytestand has nompiexec/mpiruntest invocation, soworld.sizeis one andcoloris always zero here. The test only covers the degenerate serial split and cannot detect multi-rank grouping/collective failures. Add an MPI-launched multi-process case with ranks assigned to both colors.
color = world.rank % 2
split_comm = world.split(color, "split_comm")
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wdeconinck
force-pushed
the
mpi
branch
2 times, most recently
from
September 1, 2026 20:28
ca9589a to
cb9e259
Compare
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.
This pull request introduces a new
atlas4py.mpiPython submodule, providing comprehensive MPI communicator management from eckit and interoperability withmpi4pyand other MPI libraries. It includes the C++ implementation, Python bindings, CMake integration, version parsing utilities, and extensive test coverage. The changes are grouped below by theme.New MPI Python Submodule and Bindings
mpisubmodule toatlas4py, exposing MPI communicator management, registration, and context management in Python, with support for interoperability withmpi4pyand handling communicators as integer handles or objects.CMake Integration and Version Utilities
src/atlas4py/cmake/atlas4py_parse_version.cmake). This is needed for ensuring forward/backward compatibility with different atlas versions for an API change.src/atlas4py/CMakeLists.txt).Testing
mpi4py, context management withScope, and communicator splitting (tests/test_bindings.py).These changes provide robust MPI support in
atlas4py, enable seamless integration with existing Python MPI workflows, and ensure correctness and maintainability through improved build tooling and thorough testing.