Skip to content

[Scripting] Add manual validation tools for the analysis package - #290

Closed
BenWibking wants to merge 1 commit into
analysis-5-blocksfrom
analysis-6-validation
Closed

BenWibking wants to merge 1 commit into
analysis-5-blocksfrom
analysis-6-validation

Conversation

@BenWibking

@BenWibking BenWibking commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Tools that compare the package with the tools it replaces, run by hand (they need yt, a Kangaroo checkout or real plotfiles, so they are not part of ctest).

This PR is useful for manual validation, probably not for merging.

  • tools/analysis_validation/run_comparisons.sh BUILD WORK runs every comparison and reports PASS/FAIL. Each comparison is skipped if its prerequisite is missing.
  • yt leaf cells (compare_with_yt.py): selects the same box in amrexplorer and yt, matches cells by level and center, and compares native values, cell volumes and phase masses. Set QUOKKA_PLOTFILE and QUOKKA_GALAXY to real plotfiles to run it.
  • Kangaroo FAB extrema: runs plotfile_fab_minmax.py next to Kangaroo's original on synthetic fixtures (make_amr_fixture.py, and make_nan_fixture.py with NaN cells and an all-NaN FAB) and on the real plotfile, and checks the output is byte-identical.

Results

All 9 comparisons pass:

  • On a 20-level, 22 GB Quokka plotfile, a box of 192,975 leaf cells: amrexplorer and yt select identical cells with identical gasDensity and temperature values, cell volumes and phase masses.
  • On a Quokka galaxy plotfile (six levels, MHD fields): identical leaf cells and values against yt.
  • Per-FAB extrema are byte-identical to Kangaroo's on both synthetic fixtures (six cases) and on the real plotfile's level 0 (24 fields).

Stack

Part of a stack replacing #276. Review and merge in order; each PR shows only its own layer.

  1. [Scripting] Generalize PlotfileDataset and the cache budget for analysis tools #289 Prepare PlotfileDataset and the cache budget for analysis
  2. [Scripting] Add iteration plans for leaf-cell chunks #285 Exact leaf-cell plans and chunks (C++)
  3. [Scripting] Add the amrexplorer Python package for batch analysis #286 The amrexplorer Python package (bindings)
  4. [Scripting] Add map-reduce parallel reductions over leaf cells #287 Parallel reductions and batch helpers
  5. [Scripting] Add block listing and per-block statistics #288 Block listing and per-block statistics
  6. [Scripting] Add manual validation tools for the analysis package #290 Validation tools ← this PR

🤖 Generated with Claude Code

@BenWibking BenWibking changed the title Add validation tools for the analysis package [Scripting] Add validation tools for the analysis package Oct 29, 2026
@BenWibking
BenWibking added this pull request to stack #291 October 29, 2026 01:21
@BenWibking
BenWibking marked this pull request as draft October 29, 2026 01:26
@BenWibking BenWibking changed the title [Scripting] Add validation tools for the analysis package [Scripting] Add manual validation tools for the analysis package Oct 29, 2026
tools/analysis_validation/run_comparisons.sh compares the package with
the tools it is meant to replace:

- Leaf cells against yt on real Quokka plotfiles, by matching cells by
  level and center and comparing native values (compare_with_yt.py).
- plotfile_fab_minmax.py against Kangaroo's original on synthetic
  plotfiles, including NaN cells and an all-NaN FAB, and on a real one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BenWibking
BenWibking force-pushed the analysis-6-validation branch from 0e2ad3b to fe39738 Compare October 29, 2026 01:28
@BenWibking

Copy link
Copy Markdown
Contributor Author

This is not needed as a PR.

@BenWibking BenWibking closed this Oct 29, 2026
@BenWibking
BenWibking deleted the analysis-6-validation branch October 29, 2026 01:42
@BenWibking
BenWibking removed this pull request from stack #291 October 29, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant