You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More as a side note: preCICE is compatible with the Multiple Instruction Multiple Data (MIMD) Model of MPI, where multiple executables are launched in the same world communicator.
The solver needs to support using a communicator other than world, and the adapter needs to forward the correct communicator to preCICE. None of the official adapters support this, as every participant needs to participate in such a collective split, but it should be easy to implement in in-house codes.
So, this is possible.
I wanted to try this with the Python code I work with.
While the interface suggests that one can pass a communicator of type mpi4py.MPI.Intracomm, it does not work in practice:
As soon as I pass a communicator, I get a segmentation fault with the following backtrace:
I have tried MPI.COMM_SELF and MPI.COMM_WORLD; the latter is not technically an Intracomm object but I figured this should behave exactly as passing None.
I found this issue when I started writing up a reproducible example to ask about it... Does this mean that custom MPI communicators are still not supported for the Python bindings and my error is a result of this?
Activity
valentinaschueller commentedon Apr 10, 2026
Hello @fsimonis ! Based on your comment here precice/precice#2544 (comment):
I wanted to try this with the Python code I work with.
While the interface suggests that one can pass a communicator of type
mpi4py.MPI.Intracomm, it does not work in practice:As soon as I pass a communicator, I get a segmentation fault with the following backtrace:
I have tried
MPI.COMM_SELFandMPI.COMM_WORLD; the latter is not technically anIntracommobject but I figured this should behave exactly as passingNone.I found this issue when I started writing up a reproducible example to ask about it... Does this mean that custom MPI communicators are still not supported for the Python bindings and my error is a result of this?
fsimonis commentedon Apr 10, 2026
@valentinaschueller Thanks for bringing this up.
Can you try the fix and report in the PR if this works? #256