Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cyprecice/cyprecice.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = <void*> 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, <void*>c_comm_addr)
else:
self.thisptr = new CppParticipant.Participant (convert(solver_name), convert(configuration_file_name), solver_process_index, solver_process_size)
pass
Expand Down
Loading