Skip to content

docs: attribute the supernodal 468080 B to the measured call site (#340) - #341

Merged
shinaoka merged 1 commit into
mainfrom
docs/340-attribution
Nov 9, 2026
Merged

shinaoka merged 1 commit into
mainfrom
docs/340-attribution

Conversation

@shinaoka

@shinaoka shinaoka commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What this changes

#339 narrowed two sentences that #337 had left on main. One of them ended with "its call site was not traced". It has been
traced since, in #340, so this replaces the gap with the measurement instead of leaving a stale disclaimer on main.

Measured (in #340, at e756f13 and at b989876, two runs each, release, counting allocator with backtraces at a size cap):

  • The 468080 B is not the four-array helper's request. It is one Vec<usize> of 58510 elements, allocated three times per
    symbolic analysis (1404240 B in total) inside cholesky::supernodal::ghost_factorize_supernodal_symbolic.
  • The 64000 B helper (4 · n · size_of::<I>()) only sizes a MemBuffer; it never appears as an allocation of its own.
  • The StackReq composition is reproduced exactly: 64000 + 79928 + max(32000, 48000, 96000, 64000) = 239928, and the "before"
    figure is or(332712, 239928) = 332712.
  • The largest single allocation is identical at both revisions (468080 B); what #337 removes is the COLAMD request from the or,
    which is why the simplicial largest drops from 332712 B to 239928 B and the supernodal one does not move.

Both files keep the entry on one physical line: a GitHub table cannot continue a cell across lines, which is how an earlier revision
of #339 split one entry into five rows.

Where the numbers come from (and what is not in this commit)

The probe is a throwaway crate that was never committed: two /tmp clones of the checkout, each driven by a path-dependency
probe that runs #322's 2000 x 2000, nnz = 7990 program with a counting global allocator (hooks alloc/alloc_zeroed/realloc,
a re-entrancy flag so that recording is invisible to the counters, and a backtrace captured only at or above a size cap and only
inside the measured window). The method, the toolchain, both revisions' full counter tables (two runs each) and the allocation
backtraces are in the #340 report comment: #340 (comment).

What this means for a reader of main:

  • Nothing in this commit, or in the repository, can reproduce the numbers on its own. The entry cites the measurement rather than
    presenting it as this commit's result.
  • No test in the repository asserts an allocation size. The two tests that touch the arm selection only check which arm was
    chosen, or that the numeric result agrees across thresholds: faer/tests/public_sparse_qr_symbolic.rs:32-50 picks between the
    arms on a 2 x 2 input, and faer/tests/sparse_lu_components.rs:36-55 runs AUTO / FORCE_SUPERNODAL / FORCE_SIMPLICIAL on a
    small banded matrix. Neither forces the supernodal arm at n = 2000, so neither corroborates these figures.
  • To re-check independently: run the Sparse symbolic LU/QR with an explicit column ordering still allocate the COLAMD workspace #322 probe at e756f13 and b989876 in release mode with
    CARGO_PROFILE_RELEASE_DEBUG=1 CARGO_PROFILE_RELEASE_STRIP=none, forcing SupernodalThreshold::FORCE_SUPERNODAL for LU and QR,
    and record the largest single allocation plus its backtrace, twice per case.

Verification

$ git diff --stat
 CHANGELOG.md | 6 ++++--
 PATCHSET.md  | 2 +-

Docs only. The numbers are the ones posted in #340; I did not re-run them here, and the entry says where they come from rather than
presenting them as this commit's measurement.

@shinaoka

shinaoka commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

GPT-6.1-sol adversarial review

CRITICAL: none
NEEDS_CHANGES: 0
UNVERIFIED: 1

Critical (must not merge)

none

Needs changes

none

Unverified claims

  • CHANGELOG.md:20-23, PATCHSET.md:195 — Independent reproduction of the allocation measurements remains unverified. Issue Trace the 468080 B supernodal symbolic allocation reported in #322/#337 #340 contains before/after traces showing three separate 468080 B allocations and repeated counter results, but the original temporary counting-allocator probe is not attached; I cannot read that probe to audit its re-entrancy guard or counting window. To reproduce independently, run Sparse symbolic LU/QR with an explicit column ordering still allocate the COLAMD workspace #322’s 2000 × 2000, 7990-nonzero input with identity ordering at e756f13 and b989876, in release mode, forcing supernodal LU and QR and recording allocation backtraces twice per case. The repository test at faer/tests/sparse_symbolic_colamd_workspace.rs:75-82 forces simplicial analysis, so its success cannot independently establish these supernodal measurements.

Checked and fine

  • Recomputed 58510 × 8 = 468080, 3 × 468080 = 1404240, and the workspace expression yielding 239928.
  • Traced the three array allocations through cholesky.rs:2822,2894,2908 and csc/mod.rs:1536; PATCHSET.md:195 remains one physical table row.
  • Tests and allocation probes were not rerun; the PR’s build and stable-Ubuntu test checks were still in progress when inspected, so full CI success was not established.

Reviewed head: 6ebe34f2310515bcef46f07e328a70238328d606 at 2026-11-09T08:07:00Z. This review is valid only for that commit: if the head has moved, it is a review of a tree that is not being merged.
Automated (gpt_review.sh). This is an enumeration of counterexamples, not a verdict; the merge decision stays with a human.

@shinaoka
shinaoka merged commit f387349 into main Nov 9, 2026
9 checks passed
@shinaoka
shinaoka deleted the docs/340-attribution branch November 9, 2026 08:26
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