Issue with variable time window size in serial-explicit coupling: readData(...) cannot sample data outside of current time window

Hello,

I am currently using preCICE for coupled simulations, but I have encountered an issue that I am unable to resolve on my own. I would appreciate any advice or guidance from the community.

  1. The multiphysics simulation I am running requires a variable time window size, so I have configured the config.xml such that the first participant determines the time window size. The coupling scheme is serial-explicit.

  2. During a relatively long simulation with this setup, I encounter the following error at a certain point:

        “readData(…) cannot sample data outside of current time window”

At that step, the log shows:
max-time-step-size = -1.137e-14
which is a very small negative value, likely due to floating-point round-off.

I found in some discussions that setting minDt could help avoid this pitfall. However, in my case:

I have already applied minDt to the second participant.

The first participant has preciceDt = infinity, so applying minDt there does not seem to have any effect.

Could you please advise on how I might address this issue? Alternatively, if there is someone more familiar with such cases, I would be grateful if you could direct me to them.

If needed, I can provide an error screenshot and my precice-config.xml file for reference.

Thank you very much for your help.

Hi,

I agree that this looks like some kind of rounding error.

Could you provide the configuration file and the full error message please?
Also, which participant triggers this error?
Can you share the code that computes the relative t, which is passed to the readData function?
Also, which time window sizes does the first participant generally use?

If you cannot share code, you can use one solverdummy to reproduce this issue and share the results here.

Update: I can reproduce this super easily using the solverdummies.

1 Like

I found the issue and opened a PR.
You can use the develop branch of preCICE once this is merged.

3 Likes

Hello,

Thank you for your prompt response.
I will try it out once the branch is merged.

I truly appreciate the dedication and hard work of the preCICE development team!

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.