Validation against reference implementations

dkx validates outputs and solver behavior against a mature Fortran SFINCS implementation as a reference implementation.

Note

This page reports the broad example-suite audit across the vendored SFINCS v3 examples. The single-case head-to-head runtime/memory evidence and its parity referees live in Performance and differentiability.

The release-facing comparison is the full vendored example-suite audit, with production-floor tokamak reruns merged into the frozen reference suite:

  • CPU: tests/scaled_example_suite_release_cpu_2026-05-08_production_tokamak

  • GPU: tests/scaled_example_suite_gpu_bounded_default_2026-05-08_lu3000_pas

Those artifacts report:

  • 39/39 parity_ok on CPU,

  • 39/39 parity_ok on GPU,

  • no strict mismatches,

  • no jax_error,

  • no max_attempts.

The merged reports also generate a publication-facing runtime and memory comparison. The plotted rows are restricted to cases whose SFINCS Fortran v3 reference runtime is at least 10 s; shorter rows remain CI parity/smoke checks unless they are rerun at production-comparison resolution.

python examples/publication_figures/generate_fortran_suite_benchmark_summary.py
dkx CPU/GPU suite benchmark against SFINCS Fortran v3

Release benchmark generated from the profiled CPU/GPU suite reports. Panel A compares wall-clock runtime and Panel B compares active solver memory for the reference-runtime-window subset, with separate dkx cold and warm bars for CPU and GPU. Cases are ordered by best warm dkx speedup over the Fortran v3 runtime. The benchmark artifacts have median cold JAX/Fortran wall-clock ratios of about 0.021x on CPU and 0.037x on GPU for the plotted reference-runtime subset. Median process maximum-RSS ratios remain available in the JSON audit fields, while the public memory bars use profiler active RSS deltas over the fixed Python/JAX/XLA baseline; the median active-memory ratios are about 2.89x on CPU and 3.71x on GPU. The top runtime and memory cases are recorded in examples/publication_figures/artifacts/dkx_fortran_suite_benchmark_summary.json.

Use Parity status for the scope map and comparison policy, Performance and differentiability for CPU/GPU runtime and memory context, and Fortran v3 example suite status for the exact-input frozen-fixture audit.