Skip to content

feat(bench): the direct solvers' systems exported as Matrix Market files, and photonoxide's factorization timed on them - #153

Merged
tachsin merged 5 commits into
mainfrom
feat/bench-export
Oct 5, 2026
Merged

tachsin merged 5 commits into
mainfrom
feat/bench-export

Conversation

@tachsin

@tachsin tachsin commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Part of #143 (the owner approved running PARDISO and MUMPS as external baselines). This is the repository's half: pure Rust, nothing linked. The comparison itself follows in a second PR once the external solvers are installed.

Licences, checked

  • oneMKL (with PARDISO): the Intel Simplified Software License, free including commercial use; its text has no clause on benchmarks or publishing results (its restrictions: no reverse engineering, no endorsement by Intel's name, keep the notice when redistributing).
  • MUMPS 5.x: CeCILL-C, free; it asks that publications cite it and that its authors be notified, with no restriction on comparisons.

What

  • photonoxide::bench::export: the direct solvers' systems, slab-2d (the 2D solver's 440 × 340 slab, 149 600 unknowns), and strip-24, strip-32, strip-40 (the 3D direct solver's strip, n³ cells of 40 nm, PMLs of 6: 41 k, 98 k and 192 k unknowns), with a fixed right-hand side (zero on a 3D wall's fixed values, as the solver sets it).
    • system(id), solve(system) (to round-off: the 3D direct solver, refined; in 2D, faer's LU with steps of refinement), write(dir, system, x): A.mtx (coordinate, complex, general, 1-based), b.mtx, x.mtx and about.json. Every value in its shortest decimal that reads back to the same bits.
    • factorize(system): photonoxide's own factorization timed on exactly that matrix, as its solvers do it (COLAMD in 2D, nested dissection in 3D): what PARDISO and MUMPS are compared with.
  • photonoxide bench --export <dir> [<id>...] writes them (slab-2d 1.2 s, strip-24 3.4 s, strip-32 12.0 s, solutions included).

Checked

  • A matrix (strip-24, 479 208 entries) and awkward values (the smallest subnormal, f64::MAX, 1/3) read back to the last bit; the exported solution solves its system to 1e-11; factorize uses each system's own ordering; an unknown id is refused.
  • cargo test --release, clippy on both crates, rustdoc with -D warnings.

Added since

  • The complex symmetric form. symmetric(system, x): B = S A S⁻¹ with S² = D, the diagonal for which D A is symmetric (feat(fdfd): QMR for complex symmetric matrices on the curl-curl operator's symmetric similarity, twice as fast #149's similarity), with S b and S x. write puts it in <id>/symmetric/ when the system has one (all four do), for PARDISO's and MUMPS's LDLᵀ: the gain a complex symmetric factorization would bring. Test: B is its own transpose to the last bit, and B (S x) = S (A x) to 1e-13 for an arbitrary x.
  • The fill. Factorized::factor_entries: the entries faer's LU makes room for, the Cholesky factor of AᵀA's structure in the column order, for L and for U (George & Ng 1987, doi:10.1137/0908072), from the column counts faer's own analysis computes. Test: exactly 5n − 6 for a tridiagonal matrix; less with nested dissection than in the natural order on a 2D Laplacian. On strip-32, 394 M entries: 6.3 GB, the process's whole peak.
  • Windows. On GitHub's Windows runners faer's LU leaves strip-24 a residual of 1.6, too far for the 3D solver's QMR to repair (fdfd: on GitHub's Windows runners, faer's LU of a 41k-unknown 3D strip leaves a residual of 1.6, and the 3D direct solve fails #154, opened). The two tests that factorize skip on Windows until that is settled; they pass locally, with --ignored, and on Linux and macOS.

…les, and photonoxide's factorization timed on them
…dows, where GitHub's runners factor them badly (#154)
… the fill to set against PARDISO's and MUMPS's
…lops photonoxide's factorization structure implies
…tes, so the structure's flops overstate its work
@tachsin
tachsin merged commit 86ce9b4 into main Oct 5, 2026
10 checks passed
@tachsin
tachsin deleted the feat/bench-export branch October 5, 2026 12:24
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
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