precice / precice

A coupling library for partitioned multi-physics simulations, including, but not restricted to fluid-structure interaction and conjugate heat transfer simulations.
https://precice.org/
GNU Lesser General Public License v3.0
755 stars 184 forks source link

Deadlock during initializeData in multi-coupling scheme #1512

Open MakisH opened 1 year ago

MakisH commented 1 year ago

Describe your setup

Operating system (e.g. Linux distribution and version): Ubuntu 20.04 preCICE version: 2.5.0 pyprecice version: 2.5.0.1 internal ATHLET adapter (commit cb161a9, based on 686656)

Describe the problem

I am running a case that involves three ATHLET participants: three pipes connected to each other in series. These are called SolverOne <-> SolverMid <-> SolverTwo.

They are coupled using a coupling-scheme:multi, with SolverMid as controller, everything in serial. Some data needs to be initialized, but all solvers deadlock into receiving state.

Step To Reproduce

The case is not publicly available.

Two tutorials we could use to reproduce this is the multiple perpendicular flaps and the heat exchanger simplified.

Expected behaviour

Data should initialize and the simulation should continue.

Additional context

Data initialization seems to work when composing two serial-implicit schemes (which should normally not work).

It also seems to work when initializing all or no data. The problem only appears when initializing some.

BenjaminRodenberg commented 1 year ago

Do you think you could come up with an integration test for a similar case? The multi coupling scheme is not very well tested anyway and with additional data initialization I wouldn't be too surprised, if there is an issue.

Did you try the develop version of preCICE already with your case? We changed quite a lot in initialization and maybe this also magically fixes the issue.

MakisH commented 1 year ago

Do you think you could come up with an integration test for a similar case? The multi coupling scheme is not very well tested anyway and with additional data initialization I wouldn't be too surprised, if there is an issue.

I will first check for tutorials reproducing this.

Did you try the develop version of preCICE already with your case? We changed quite a lot in initialization and maybe this also magically fixes the issue.

I did not yet try develop, as I would need to port several breaking changes and the uncertainties are already many. But I will once there is something specific to try out.

uekerman commented 1 year ago

I will first check for tutorials reproducing this.

Not strictly necessary in my opinion. Reproducing with an integration test should be easier.

MakisH commented 1 year ago

Note that initializing all (or no) data works. The problem seems to be specifically when initializing only some data.

MakisH commented 1 year ago

I will first check for tutorials reproducing this.

Not strictly necessary in my opinion. Reproducing with an integration test should be easier.

As discussed today: We (potentially I) could reproduce the problem in an integration test for v2.5. If we can reproduce the problem, we port the test to develop and see if it still holds. @fsimonis restructured the related code recently and this should hopefully be fixed already in develop.

uekerman commented 1 week ago

I could imagine that this problem was fixed with v3.0.

fsimonis commented 1 week ago

We should implement this as a test in the hackathon

carme-hp commented 4 days ago

The issue still exists with v3. See #2133 and #2134 .