Skip to content

Archive and compare iterations.log for implicit coupling#743

Open
PranjalManhgaye wants to merge 3 commits into
precice:developfrom
PranjalManhgaye:issue-440-archive-compare-iterations-log
Open

Archive and compare iterations.log for implicit coupling#743
PranjalManhgaye wants to merge 3 commits into
precice:developfrom
PranjalManhgaye:issue-440-archive-compare-iterations-log

Conversation

@PranjalManhgaye
Copy link
Copy Markdown
Contributor

@PranjalManhgaye PranjalManhgaye commented Mar 8, 2026

Summary

Implicit coupling tutorials write precice-*-iterations.log files that show how many coupling iterations each time step needed. This PR adds system-test support to save those logs and check them against reference copies, so we notice when coupling behaviour changes unexpectedly. Closes #440.

Changes

  • Systemtest.py: After a tutorial run, collect precice-*-iterations.log files into iterations-logs/ and compare them by SHA-256 hash against archived reference copies in a *.iterations-logs/ directory next to each reference .tar.gz. A successful check is logged at INFO; a mismatch fails the test.
  • generate_reference_results.py: When you regenerate reference results, the iterations logs are copied into that *.iterations-logs/ folder so future runs have something to compare against.
  • README.md: Documents the behaviour.
  • changelog-entries/743.md: Changelog entry for this PR.

test (local)

image

Notes

  • Tests without reference iterations logs skip comparison (unchanged tutorials).
  • Explicit coupling (no iterations logs) is unaffected.

Checklist

  • Changelog entry in changelog-entries/743.md

@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-pranjal-manhgaye/2769/5

@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 May 17, 2026

@PranjalManhgaye could you please resolve the merge conflicts and prepare this PR for reviewing?

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.

Some first comments. I have not yet looked at the complete PR or tested it.

Comment thread tools/tests/generate_reference_results.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread changelog-entries/440.md Outdated
@MakisH MakisH changed the title Archive and compare iterations.log for implicit coupling (fixes #440) Archive and compare iterations.log for implicit coupling May 17, 2026
@PranjalManhgaye
Copy link
Copy Markdown
Contributor Author

thanks @MakisH for your review , i will make this pr review ready and also resolve conflicts .

Archive precice-*-iterations.log files during system tests and compare
them against reference copies for implicit-coupling regression checks.
@PranjalManhgaye PranjalManhgaye force-pushed the issue-440-archive-compare-iterations-log branch from 4ed9d9f to 4a1885d Compare May 18, 2026 07:19
@PranjalManhgaye
Copy link
Copy Markdown
Contributor Author

Hi @MakisH , rebased onto develop, updated the PR description, and replied on your review threads. ready for another look when you have time.

@PranjalManhgaye PranjalManhgaye requested a review from MakisH May 18, 2026 07:41
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 have not yet completed my review, but here is already a first comment on something to check.

Tests I have executed locally:

  • python3 systemtests.py --suites="openfoam_adapter_release" (no iterations in the reference results) succeeds
  • python3 generate_reference_results.py --suites="openfoam_adapter_release" worked and generated results in an (uncompressed) folder flow-over-heated-plate/reference-results/fluid-openfoam_solid-openfoam.iterations-logs with fluid-openfoam/precice-Fluid-iterations.log and solid-openfoam/precice-Solid-iterations.log.
  • after updating the reference results: python3 systemtests.py --suites="openfoam_adapter_release" worked, but I don't see sha256 or iterations in the output to confirm.

Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py
Remove legacy .iterations-hashes.json support and log INFO when
iterations.log SHA-256 comparison passes so reviewers can confirm it ran.
@PranjalManhgaye
Copy link
Copy Markdown
Contributor Author

Hi @MakisH , pushed 095502d ; removed the JSON sidecar fallback and added INFO output when the iterations hash check passes.
Re-tested openfoam_adapter_release locally => same steps as you, and the second run now shows the INFO line.readme updated ,
Ready for another look when you can.

@PranjalManhgaye PranjalManhgaye requested a review from MakisH May 18, 2026 10:47
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.

Archive and compare iterations.log

3 participants