Skip to content

Add per-test fieldcompare tolerance and skip_compare#847

Merged
MakisH merged 12 commits into
precice:developfrom
PranjalManhgaye:feature/837-fieldcompare-tolerance
Jun 29, 2026
Merged

Add per-test fieldcompare tolerance and skip_compare#847
MakisH merged 12 commits into
precice:developfrom
PranjalManhgaye:feature/837-fieldcompare-tolerance

Conversation

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator

summary

closes #837

i added optional tolerance and skip_compare fields in tests.yaml so we can override fieldcompare rtol per test (or skip compare entirely if we only care about build + run).

before this we had some tests stuck in expected-to-fail or commented out in component suites because exported vtk values are tiny and the default 3e-7 rtol basically always fails. now those cases use tolerance: 1e-2 instead.

what changed

  • parse tolerance and skip_compare in the system test yaml loader
  • pass rtol into the fieldcompare docker compose template (-rtol {{ tolerance }})
  • wire it through systemtests.py and generate_reference_results.py
  • remove the expected-to-fail suite
  • re-enable the affected tests in fenics-adapter, openfoam-adapter, micro-manager, and nutils-adapter
  • docs + changelog entry
    tests without tolerance still use the default 3e-7 so behavior for everything else should be the same.

local testing

i tried to run things locally on my machine , elastic-tube-3d (fluid-openfoam + solid-fenics) : full build / run / fieldcompare pass with -rtol 0.01 (32/32 comparisons) , this is the main case we cared about for this issue.

macro-nutils_micro-nutils : reference tarball doesn’t exist on develop yet so i couldn’t validate that one end-to-end
so yeah locally we’ve got solid proof for the fenics case ; the rest we’ll need ci .

notes for reviewers

would be great to trigger system tests on fenics-adapter, openfoam-adapter, micro-manager, dumux-adapter (and nutils-adapter once the nutils reference exists)
macro-nutils_micro-nutils is re-enabled in yaml but the reference file might still be missing upstream : heads up if ci complains there

happy to tweak tolerance values if 1e-2 is too loose or too tight for any of the three cases ,,

Allow overriding fieldcompare rtol via tests.yaml and optionally skip
the compare step. Re-enable previously quarantined tests with tolerance
1e-2 for near-zero exported fields.
Wrap long tolerance/skip_compare lines so check_style pre-commit passes.
@PranjalManhgaye PranjalManhgaye requested a review from MakisH June 17, 2026 09:21
@MakisH MakisH changed the title Add per-test fieldcompare tolerance and skip_compare (#837) Add per-test fieldcompare tolerance and skip_compare Jun 23, 2026

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for implementing!

Here are some comments to apply before testing on GHA.

Comment thread tools/tests/tests.yaml Outdated
Comment thread tools/tests/README.md Outdated
Comment thread tools/tests/generate_reference_results.py
Comment thread changelog-entries/847.md Outdated
Comment thread tools/tests/systemtests/Systemtest.py
Comment thread tools/tests/systemtests/Systemtest.py Outdated
Comment thread tools/tests/systemtests/Systemtest.py
Sort re-enabled tests alphabetically, apply README/changelog wording,
drop compare settings from generate_reference_results, and simplify
skip_compare logging.
@PranjalManhgaye PranjalManhgaye requested a review from MakisH June 25, 2026 03:37

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test on GHA - state:

  • the two-phase-heat-conduction cases fail to build the micro-dumux participant. This is irrelevant, I will investigate. -> See #852 -> results again have a too large range, but the feature works - disabled comparisons for now, see #393 for a potential solution.
  • the Elastic tube 3D (fluid-openfoam, solid-fenics) case passes, but running takes long, and comparing takes even longer. Maybe this just happened once, I will investigate. -> See #853 -> disabled the comparisons for this case (test)

Resolve Systemtest.py conflict: keep build_timeout defaults from
develop (precice#848) and fieldcompare tolerance/skip_compare from precice#847.
@PranjalManhgaye PranjalManhgaye requested a review from MakisH June 29, 2026 13:33

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I did some more tests and adjustments, and opened a few issues.

The two-scale-heat-conduction case was not running. It runs now, but the results are still not covered by a larger tolerance. See #393 (comment) for a potential solution.

The elastic-tube-3d/solid-fenics takes too long to compare, so I have disabled the comparison of that one as well for now.

I added the following to the release test suite:

  • elastic-tube-3d_fluid-openfoam_solid-fenics
  • two-scale-heat-conduction_macro-dumux_micro-dumux

and the following to the extra:

  • two-scale-heat-conduction_macro-nutils_micro-nutils (will not work before the next release of the micro-manager)

@MakisH MakisH merged commit c9d2a44 into precice:develop Jun 29, 2026
1 check passed
PranjalManhgaye added a commit to PranjalManhgaye/tutorials that referenced this pull request Jun 30, 2026
Integrate latest develop (precice#847 tolerance/skip_compare, precice#848, precice#852, etc.)
and resolve TestSuite.py conflict while keeping external: tutorial support.
Set skip_compare on external suite entries now that precice#847 is merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overriding the fieldcompare tolerance (or skipping)

2 participants