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 }} 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/CHANGELOG.md b/CHANGELOG.md index fcb0ccbc..553bc362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 3.5.0 + +* 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 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 diff --git a/examples/solverdummy/.gitignore b/examples/solverdummy/.gitignore index 4f6df735..919dfbc4 100644 --- a/examples/solverdummy/.gitignore +++ b/examples/solverdummy/.gitignore @@ -3,3 +3,4 @@ venv .idea *.log __pycache__ +precice-profiling