New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub_cycling sync time not properly adjusting with negative times #15766
Comments
Before I open a PR with the proposed changes, could someone let me know if this is an appropriate fix? |
Looks good to me. At least this fix is a super set of current capabilities. I will just go ahead to create the PR. |
The main difficulty is to create a simple test that would reproduce the original problem. But I'll see if I can come up with one. |
|
Bug Description
Until #14865 is fixed, a workaround is to run a pseudo-transient from
start_time = some_negative_time
toend_time = 0
and to restart the actual transient from that solution.However, when such a pseudo-transient is performed with a main app driving a sub-app and
sub_cycling
is used, the sub-app may become out of sync with the main app. This is because the sub-app picks its own time step withsub_cycling
and is supposed to make sure that the chosendt
does not put it after thetarget_time
.Unfortunately, the current check is:
The check
_target_time > 0
is not pertinent with negative times. I am not 100% sure why there is that condition in this if-statement but it seems to me that it is because we havetarget_time
set by default to -1:If instead, I apply the following patch:
Everything behaves as expected (in the same way as it does with positive times).
Steps to Reproduce
Currently, I do not have any simple example reproducing the error that I can share.
Impact
This is problematic because the sub-apps become out-of-sync.
The text was updated successfully, but these errors were encountered: