preCICE allows mixing different configuration files
It is possible to mix implicit and explicit couplings.
Describe your setup
Operating system (e.g. Linux distribution and version): Ubuntu 18.04 preCICE Version: Commit cdf38703e0ad7debbd76c6785fdc0d3d9d3d2dfc from this PR: https://github.com/precice/precice/pull/84 as debug build
preCICE is used via Python using the bindings v2.1.1.1
Describe the problem
One can mix implicit and explicit couplings. The solver using the explicit coupling will interpret the subiterations of the implicit solver as time windows and participate. The simulation will eventually hang
Step To Reproduce
- Choose a
serial-implicitcoupling configuration of your solver - Choose a
serial-explicitcoupling configuration of your solver - Run the simulation
- The
serial-implicitsolver will start the subiterations while theserial-explicitsolver will interpret each subiteration as time windows.
I have only testet this with serial coupings.
Expected behaviour
I would expect an error message and termination of the solvers.
You mean that you use two different precice-config.xmls for both coupled solvers?
That is not allowed and could indeed be a good idea to implement a check for this.
You mean that you use two different
precice-config.xmls for both coupled solvers?
Yes, I mixed two different config files. Sorry for being unclear here.
Even for the "same" config file one could mess up:
- Start solver A with
precice-config.xml. It will wait for solver B. - Edit
precice-config.xmlto use a different coupling/different settings and save the changes. - Start solver B with
precice-config.xml. Simulation will start, but most likely with unexpected behavior.
In this case it would be the "same" file, but with different content.
Maybe it would be safest to compute a hash of the configuration files used and then to compare them?!
This PR is related to #669. We need a validation step in the master-master handshake. Integrating the hash of the configuration file content should be simple.
Maybe we should rename the issue to "preCICE allows mixing of different configurations" again?
I have not tested it further, but I assume one could also start solvers with other options being changed/mixed, like one solver starting with max-iterations value=10 and the other one with max-iterations value=20?!
A possible good-enough implementation could be to hash the content of the configuration file after reading and exchange this when establishing connections between solvers.