Skip to content

Add per-test max_time override for system tests#744

Merged
MakisH merged 5 commits into
precice:developfrom
AdityaGupta716:systemtests/max-time-override
May 11, 2026
Merged

Add per-test max_time override for system tests#744
MakisH merged 5 commits into
precice:developfrom
AdityaGupta716:systemtests/max-time-override

Conversation

@AdityaGupta716
Copy link
Copy Markdown
Contributor

@AdityaGupta716 AdityaGupta716 commented Mar 8, 2026

What this PR does

Adds an optional max_time field to entries in tests.yaml to cap preCICE simulation time per test case.

How it works:

  • Reads a max_time value from tests.yaml
  • Overwrites the <max-time> (or <max-time-windows>) value in precice-config.xml while preparing the case to run
  • Applies consistently to both test runs and reference result generation

Closes #402

Checklist

  • I added a summary of any user-facing changes in changelog-entries/402.md
  • I will remember to squash-and-merge with a useful summary

@AdityaGupta716
Copy link
Copy Markdown
Contributor Author

@MakisH Plz review

@precice-bot
Copy link
Copy Markdown
Collaborator

This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/gsoc-2026-aditya-gupta/2773/4

@MakisH MakisH added GSoC Contributed in the context of the Google Summer of Code systemtests labels Mar 13, 2026
@MakisH
Copy link
Copy Markdown
Member

MakisH commented Mar 23, 2026

How does this PR relate to the previously opened #738?

@AdityaGupta716
Copy link
Copy Markdown
Contributor Author

@MakisH yes PR tackles the same issue as #738. I opened it separately because I wanted to keep the scope focused just the max_time override, without the iterations-log changes that #738 also includes.
There are a couple of small differences in approach too: this one fails fast on invalid max_time values instead of silently skipping, and adds a README example.

Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this PR (and some other) could benefit from:

  • A short explanation of the main idea:
    • Reads a max-time value from tests.yaml
    • Overwrites the value in the precice-config.xml while preparing the case to run.
  • Some Markdown formatting, especially where you show code.

Given my previous comment on the relation to another PR (#744 (comment)), note that I still need to review the other PR as well. Maybe don't rush implementing everything.

Comment thread changelog-entries/402.md Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/TestSuite.py Outdated
Comment thread tools/tests/components.yaml
@AdityaGupta716 AdityaGupta716 force-pushed the systemtests/max-time-override branch from 8201a5c to 4c199dd Compare March 27, 2026 20:19
@AdityaGupta716 AdityaGupta716 force-pushed the systemtests/max-time-override branch from 4c199dd to 8a96d5b Compare March 27, 2026 20:37
@MakisH MakisH changed the title systemtests: add per-test max_time override for precice-config Add per-test max_time override for system tests May 9, 2026
Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally for max_time, and it works. Everything else looks good now.

Note that fieldcompare fails due to missing source files. I tried adding --ignore-missing-source-files, but then it still fails in the last time window, since the behavior is a bit different (probably a bug in the OpenFOAM adapter) and gave an error of just above the tolerance. This means that we cannot reuse the same reference results without some handling, but it is still useful for more complex cases.

Thanks again for contributing!

@MakisH MakisH merged commit 5e651ca into precice:develop May 11, 2026
1 check passed
@AdityaGupta716 AdityaGupta716 deleted the systemtests/max-time-override branch May 11, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSoC Contributed in the context of the Google Summer of Code systemtests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict preCICE time for selected tests

3 participants