From f40889ab2d8d85560ef60cdaf7af2b6d694255b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Fri, 10 Apr 2026 16:19:16 +0200 Subject: [PATCH 1/6] Fix passing MPI communicators Participant (#256) * Fix passing MPI communicators Participant * Added changelog * Update cyprecice/cyprecice.pyx Co-authored-by: Ishaan Desai --------- Co-authored-by: Ishaan Desai --- CHANGELOG.md | 4 ++++ cyprecice/cyprecice.pyx | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb0ccbc..1c58f717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## latest + +* Fixed passing custom MPI communicators to the Participant https://github.com/precice/python-bindings/pull/256 + ## 3.4.0 * Added support for documentation rendering https://github.com/precice/python-bindings/pull/250 diff --git a/cyprecice/cyprecice.pyx b/cyprecice/cyprecice.pyx index db014b19..22159c84 100644 --- a/cyprecice/cyprecice.pyx +++ b/cyprecice/cyprecice.pyx @@ -63,7 +63,7 @@ cdef class Participant: Rank of the process solver_process_size : int Size of the process - communicator: mpi4py.MPI.Intracomm, optional + communicator: mpi4py.MPI.Comm, optional Custom MPI communicator to use Returns @@ -82,10 +82,10 @@ cdef class Participant: pass def __cinit__ (self, solver_name, configuration_file_name, solver_process_index, solver_process_size, communicator=None): - cdef void* communicator_ptr + cdef size_t c_comm_addr; if communicator: - communicator_ptr = communicator - self.thisptr = new CppParticipant.Participant (convert(solver_name), convert(configuration_file_name), solver_process_index, solver_process_size, communicator_ptr) + c_comm_addr = MPI._addressof(communicator) + self.thisptr = new CppParticipant.Participant (convert(solver_name), convert(configuration_file_name), solver_process_index, solver_process_size, c_comm_addr) else: self.thisptr = new CppParticipant.Participant (convert(solver_name), convert(configuration_file_name), solver_process_index, solver_process_size) pass From c86328a1e1e8ca270d422023797f9929253c8479 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 18 Jul 2026 10:01:29 +0200 Subject: [PATCH 2/6] Update .gitignore --- .gitignore | 2 +- examples/solverdummy/.gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 833e4c93..cb1629ad 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ docs/_build docs/.docs_venv *.egg-info __pycache__ -env +**/.venv diff --git a/examples/solverdummy/.gitignore b/examples/solverdummy/.gitignore index 4f6df735..c24c45ea 100644 --- a/examples/solverdummy/.gitignore +++ b/examples/solverdummy/.gitignore @@ -3,3 +3,4 @@ venv .idea *.log __pycache__ +precice-profiling \ No newline at end of file From b8824810995c0ebc6c51163c596893e5792b6888 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 18 Jul 2026 10:04:53 +0200 Subject: [PATCH 3/6] Fix pre-commit errors --- examples/solverdummy/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/solverdummy/.gitignore b/examples/solverdummy/.gitignore index c24c45ea..919dfbc4 100644 --- a/examples/solverdummy/.gitignore +++ b/examples/solverdummy/.gitignore @@ -3,4 +3,4 @@ venv .idea *.log __pycache__ -precice-profiling \ No newline at end of file +precice-profiling From 7b4e02a508cd97f92b3db6295ec9a64e0766c076 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sat, 18 Jul 2026 10:40:43 +0200 Subject: [PATCH 4/6] Add a workflow to trigger the system tests (#259) --- .github/workflows/run-system-tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/run-system-tests.yml diff --git a/.github/workflows/run-system-tests.yml b/.github/workflows/run-system-tests.yml new file mode 100644 index 00000000..f7792194 --- /dev/null +++ b/.github/workflows/run-system-tests.yml @@ -0,0 +1,13 @@ +name: System tests + +on: + pull_request: + types: [labeled] + +jobs: + run-system-tests: + if: ${{ github.event.label.name == 'trigger-system-tests' }} + uses: precice/tutorials/.github/workflows/system-tests.yml@develop + with: + suites: python-bindings + build_args: PYTHON_BINDINGS_PR:${{ github.event.number }},PYTHON_BINDINGS_REF:${{ github.event.pull_request.head.sha }} From c712c01e6e66bcb051b2d46f740f56722933eb09 Mon Sep 17 00:00:00 2001 From: Shubham Padkonde Date: Thu, 1 Oct 2026 14:55:14 +0530 Subject: [PATCH 5/6] Add main preCICE API guide to documentation navigation (#261) --- docs/index.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 271e3e49..66c14eea 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,3 +8,8 @@ The preCICE python bindings precice MigrationGuide ReleaseGuide + +.. toctree:: + :caption: External pages: + + Coupling API overview From f1bc08d62efe7c881acfc96d7e1a7780ee67dff9 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Thu, 12 Nov 2026 08:26:02 +0530 Subject: [PATCH 6/6] Bump version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c58f717..553bc362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. -## latest +## 3.5.0 * Fixed passing custom MPI communicators to the Participant https://github.com/precice/python-bindings/pull/256