Float32 partial sums in the CPU hot loops, and the PCG preconditioner¶
Status, 2026-11-30: run on the Dell (f32_pcg, Phases 0-8 done, 2026-11-28/29); the Apple-silicon read of
decision 12 made 2026-11-30, nothing restored; the result in float32_kernels_and_pcg_precond_report.md. Decisions 1 to 14 ruled by Hans
2026-11-28; rulings R1-R12 in Progress and in the decisions they change.
Base: d416d2898 (the commit that adds this plan sits on top; the launch copies the checkout at that commit
and Phase 0 records the base it got). Supersedes: none. Reopens section 4.5 ("Precision") of
../completed/cont_lm_acceleration.md for objfun=euclid (decision 2; a pointer is added there).
Depends on: the block kernel of prob_table_matrix_scoring.md (simple_polarft_block.f90, in the tree at the
base; validated: yes, Dell, run table_gemm); the library LM engine lm_solve (validated: yes, lm_optimizer.md
Phases 0-4); the measurements of the mlx-fortran reference implementations (~/src/mlx-fortran/doc/algorithms/,
pages 8, 9 and 11; validated: on the GPU and on MLX's CPU device, never on SIMPLE's CPU code).
Integration owners: polarft_calc (src/main/pftc) for the distance conversion, the shift-map scoring and the
Euclidean shift-search kernels; simple_eul_prob_tab_utils.f90 for the posterior draw; cartft_calc
(src/main/cftc) for the continuous kernel; reconstructor_pcg (src/main/volume) and pcg_solve
(src/main/opt) for the PCG. No layer changes: every edit is inside a domain object's kernel.
Queue: polar_continuous_view.md edits simple_polarft_cont_calc.f90, which this plan does not touch;
refine3d_local_cartesian_priors_todo.md is active in simple_cartft_pose_opt*.f90, and this plan edits the
calculator, not the optimizer (one call site, "if needed"); multistate_sigma2_anneal_validation.md runs on dell2
and edits nothing here. Master is not frozen and the run does not sync with it: its diff applies to the base, and
the files of the table should not be edited on master while it runs (section 7).
1. Why¶
Three observations from the mlx-fortran work may carry to SIMPLE's CPU code. None is measured there.
- The probability tables are the largest measured share of refinement, and what is left of their score loop
is in double precision. On beta-galactosidase (box 256, 4 parts of 6 threads, Dell) the tables took 1,158 of
1,450 s of a three-state refinement and 310 of 870 s of a single-state one
(
multistate_speed_run_completed.md). The sums are single-precisioncgemmsincetable_gemm; the distances and the keyed draw, "the same code in every layout", cost 2.9 µs per pair at one thread beside 6.7 to 9.6 µs for the whole block kernel (prob_table_matrix_scoring.md, section 1). They convert every rotation to double (euclid_dists_from_crvec) and take one doubleexpper rotation behind two branches (draw_posterior_row). In the same record (stage 5, dense table) the shift refinement cost 54 thread-seconds per iteration and part beside the score loop's 79; its L-BFGS-B kernels (gen_euclid_residual_grad, the_8cost kernels) form every term incomplex(dp). - Continuous pose refinement evaluates one pixel at a time in double.
pose_normal_termscalls the gather across a module boundary per pixel and carries about 25 double accumulators; it runs at 62 thread-ns per pixel-evaluation and 4.70 passes per solve (cont_lm_acceleration.md, stage L, M2 Ultra). The mlx-fortran kernel evaluates the same 23 sums in float32 with the decisions in double and agrees with a double oracle to 2.4e-7 (objective), 1.3e-7 (gradient) and 1.0e-6 (matrix); SIMPLE's stopping tests are relative reductions of 1e-6. The share of continuous refinement in a run has not been measured since its search fell from 19.3 to 1.9 s. - The PCG preconditioner may slow the solve it preconditions. It is zero outside the native Nyquist sphere
and on unmeasured voxels by design (
finalize_density_accum). On mlx-fortran's fully covered fixture the preconditioned block's condition number was 1.3e6 against 122 without it, and after 2 and 5 iterations the iterates were 0.68 and 0.36 from the exact solution with it against 0.31 and 0.19 without (N = 32). SIMPLE's own record has no with/without comparison; it has a preconditioned residual of 0.18 to 0.31 after two iterations of an operator the decision log calls "the identity up to the support crop" (pcg_decision_log.md). At two iterations from a zero start three of the solve's five padded FFT pairs are preconditioner applications, the last of them for the reportedMRESonly.
Release is -O3 without -ffast-math and without LTO (cmake/CompilerConfig.cmake), so a double sum is a serial
chain of additions whatever its vector width, and a per-pixel call into another module is not inlined. Float32
terms alone therefore buy little: the recipe below is float32 terms and sums written so that they vectorise.
No gain is estimated here. Phase 0 measures each loop's share, and the order of the phases follows it.
What the code check changed (at d416d2898)¶
rec_backenddefaults togridding(simple_parameters.f90): no default workflow runs the PCG. Its phases are gated on runs withrec_backend=pcg, and the gridding runs must stay byte-identical through them.- The parts' raw PCG accumulators are deleted when every state has been solved
(
simple_rec3D_pcg_strategy.f90, "Delete raw artifacts only after every state has completed"). Real accumulators for the comparison are therefore captured by a patched export that skips that deletion (decision 9); no production switch is added for it. - The array
precondis also the closed-form regularised map's factor (1 - P_tau*precond, the comment above the closed-form solve insimple_reconstructor_pcg.f90). An arm of the comparison changes only whatapply_precondmultiplies by, never the array the closed form reads. - Production reaches
shiftmap_drawthroughshiftmap_mode(greedy): its cell-scoring loop runs for every mapped pair, its disk draw never. Only the scoring loop is in scope. - The distance conversion and the draw are one compiled procedure for the 2D and the 3D tables
(
simple_eul_prob_tab2D.f90,simple_eul_prob_tab.f90,_neigh,_marginal): a change moves the last bits ofsolve2Das well.simulated_workflowrunssolve2Dandsolve3D, so its profile judges both. - The Euclidean shift-search kernel already sums per shell (
fk,gkx,gky) and applies the double weightsigma2_wk8(k)to each shell's sum: the per-shell partial is there, only its terms are double. !$omp simdappears three times insrc(the gridding density update, the polarizer gather);-fopenmphonours it. On Apple silicon the build passes no-marchor-mcpu(ARCH_FLAGis-mtune=generic), on Linux-march=native.
2. Contract¶
- The recipe. Terms and their products in single precision; sums as float32 partial sums whose length is
fixed by the data (a shell, a line of a volume, a block of pixels), each written as an
!$omp simdreduction over a contiguous index; the partials added in double in a fixed order. Constants are computed in double and rounded once. Every quantity that decides a result stays double: the PCG's alpha, beta and stopping tests; the 5 x 5 LM system, its finalisers and every accept or reject; L-BFGS-B's cost and gradient; the draw's cumulative sum and target. - What changes. The last bits of the distances, the drawn rotations on rare near-ties, the shift search's
cost and gradient, the continuous kernel's terms under
objfun=euclid, the PCG's scalars; and, if decision 9 rules for it, the PCG iterates themselves. - What stays byte-identical at one thread with a fixed seed. Every
objfun=ccpath (the cc kernels ofpftcandcftcare not edited); every run withrec_backend=griddingthrough the PCG phases; the LM curvature kernels of the polar joint mode; the gridding reconstructor, the projector, class averaging. - Thread identity. A result depends on no team size, batch or part: partial sums are cut by the data's
layout, never by the thread that computes them, and each is computed whole by one thread
(
polar_matching_bench suite=fills; the PCG solve at one thread against the team). - Off-state. There is no switch and no new parameter. A change that fails its bar is restored, not hidden
behind a flag. Experimental variants (the preconditioner arms, the capture of decision 9) are patches on a
git archiveexport in the run's scratch and never enter the diff. - No new compile flags, no per-file options, no new CMake target (
doc/policies/compile_time_policy.md).
3. Decisions and rulings¶
Ruled 2026-11-28 by Hans: decisions 1 and 2 by explicit choice, decisions 3 to 14 as proposed, each with the origin of its numbers. Never renumbered.
- (Hans) The run may adopt in production every change of the five areas that passes its bar, the PCG preconditioner included, under the verdict rule of decision 9.
- (Hans) Section 4.5 of
cont_lm_acceleration.mdis reopened forobjfun=euclid: float32 terms with partial sums added in double. The correlation objective keeps its double kernel (1 - cc cancels near the optimum: measured in mlx-fortran, a pose stops resolving at about 1e-4 rad in float32 against 1e-7 for Euclid). Ruling R12 (2026-11-29, during Phase 7, "Plan it after"): nothing changes in this run, the cc kernel stays double and byte-identical; Phase 8 adds to Phase 7's Progress the cc kernel's share beside the Euclidean one and whether the pixel table and the array gather could serve a cc kernel, and the report proposes a correlation kernel in residual form (the per-pixel residual of the two unit-norm images) for a later plan, with its open question and its bar. - Order and the reorder clause. Phase 0 measures, per area, the target loop's thread-seconds as a share of
its production entry on bgal. Phases 4 to 8 run in the order of those shares, largest first; the order
written in section 8 is the default if the shares are within two points of each other. An area whose loop
is below 3 % of its entry's thread-seconds on every Phase 0 case (guessed) is skipped with a Progress entry
"measured out". The preconditioner comparison (Phases 1 and 2) runs regardless: it is a convergence
question. Ruling R4 (at launch): the driver runs the phases in the written order 0 to 8; Phase 0 records
the order the shares would give and the run does not reorder. Ruling R8 (2026-11-28, during Phase 0): the
shares come from the benchmarks, from a scratch timer build where a benchmark has no breakdown, and from
the simulated entries (
simulated_workflow_6vxx'ssolve3Drecords,cont_refine3D_bench, the PCG benchmark of Phase 1), not from bgal; the 3 % rule applies to those. - Partial sums. Polar shift search: one partial per shell, as the code has it. PCG inner products: one partial per line of the volume (dimension 1), box x box of them (mlx-fortran measured 5.9e-9 and 6.4e-9 against a double sum at N = 160 and 256). Continuous kernel: blocks of B pixels of the slot's pixel table, B taken from a measured table over 64, 256, 1,024 and the whole band as the largest B whose errors are within 1.5 times the best (the rule mlx-fortran used; its CPU answer was 32 partials for 6,144 terms).
- Kernel tolerances. Each new kernel is judged in its tester against the double kernel it replaces, fed the same single-precision inputs, by a measure at the quantity's scale. The tolerance is twice the largest error measured on the calibration seed on the Dell (four times for a quantity at float32's floor), frozen in Progress before the judged seeds (two further seeds) run, and never above these ceilings (guessed, from mlx-fortran's measured values times four): continuous objective and gradient 1e-6, Gauss-Newton matrix 4e-6 of its diagonal; PCG inner product 1e-6 relative (mlx-fortran's own acceptance); Euclidean distance 4.8e-7 absolute (four float32 epsilons); shift-search cost and gradient 1e-6 relative to the cost and to the largest gradient component. A calibration error above its ceiling is a stop. Ruling R11 (b) (2026-11-29, after Phase 3): for the PCG's line-partial inner product only, the tolerance Phase 3 froze from one calibration seed (7.83e-10) is replaced by 2.2e-9, twice the largest error of a 40-seed diagnosis, and judged on three fresh seeds (45, 46, 47), a miss there being a stop; the rule, the ceilings and every later phase's calibration are unchanged, and this sets no precedent. Ruling (Hans, 2026-11-29, at the Apple-silicon read of Phase 7): the continuous kernel's gradient is judged as the Gauss-Newton step it moves, max |H^-1 (g_sp - g_dp)| over the five components (radians and pixels), at every pose, against a ceiling of 1e-7, the float32 Euclidean pose resolution of decision 2. The gradient relative to its largest component failed on the Mac (gfortran 16, arm64: 9.2e-7 to 3.7e-6 against the frozen 9.05e-7 and the ceiling 1e-6), only at the truth pose, where the gradient vanishes; as a step that error is at most 2e-8. The tolerance comes from 20 fresh seeds on the Mac (20261201 to 20261220: largest 5.11e-8, median 3.17e-8), twice the largest capped at the ceiling: 1e-7. The tester's seeds give 1.80e-8 (calibration), 2.59e-8 and 3.96e-8. Neither fused multiply-add (off: largest 2.4e-6) nor the rotation Jacobian's cross products (in double: 3.5e-6) explained the Mac's larger relative error; it is the pass's float32 rounding in a sum that cancels.
- The speed bar (guessed; frozen now). A kernel change is kept if and only if (i) on the area's benchmark the
target loop's thread-seconds at the team of 24 fall by at least 10 % and by more than twice the A-A spread,
(ii) at one thread pinned to a P core it is not more than 2 % slower, both as medians of at least three
interleaved repeats each way, six for the team, with the machine's load beside them, and (iii) the area's
production entry on bgal, twice, is not more than 2 % slower in wall time. Otherwise the change is restored
and recorded as a loser with its mechanism. Ruling R8 (c) replaces bgal in (iii) by the area's simulated
entry:
simulated_workflow_6vxxat seed offset 0 (wall time and the fills' thread-seconds) for the polar areas, thecont_refine3D_benchruns' wall time for the continuous kernel, three interleaved repeats each way, not more than 2 % slower or within the base's A-A spread if that is larger; for the PCG, (i) on the benchmark's production-size systems is the whole bar and (iii) lapses. Ruling R1: no speed verdict while the load that is not the run's own is above 2. - The array exponential. The draw's weights
exp(-arg)forargin [0, 80) are computed by one array-in, array-out single-precision routine insimple_math.f90(range reduction and a polynomial, its loop inside the routine so that it vectorises without inlining), accurate to 2 units in the last place of float32 against the doubleexp(guessed; measured by its tester over 1e6 arguments; a larger error is a stop). Weights belowexp(-80)stay exactly zero. - Map tolerance for a last-bits change (ruling R5 of
prob_table_matrix_scoring.md, 2026-11-21, reused): the bgal run's final FSC at 0.143 and at 0.5 within one Fourier shell of the base's, and its final map's correlation with the base's at least 0.98 over the whole map and within the mask. Phase 0 measures the base's own last-bits perturbation (three parts of eight threads) at this base for scale. Lapsed by ruling R8 (d), with section 6's bgal lines and the stops that name bgal, after Phase 0 found that the base bgalsolve3Ddoes not reproduce itself at a fixed seed (Progress): numerical validity is judged by decisions 5 and 7, the thread identity, the byte identity of the cc and gridding paths (test=identity target=simulated_workflow_6vxxat one thread; the cc runs ofcont_refine3D_bench), the 6vxx profile of Phase 6,cont_refine3D_1jxy,pcg_reconand the library entries. - The preconditioner verdict (pre-registered; thresholds guessed, fixed by the control).
- Arms: P0, the code as it is; P1, no preconditioner (the mask only: the path
apply_precondtakes whenl_precondis false); P2, P0 with every zero of its diagonal on the padded lattice replaced by the diagonal's smallest positive value, which makes it positive definite without amplifying an unmeasured mode more than the best-measured one. Each arm is a patch ofapply_precond's multiplier on an export. Ruling R5 (at launch, applied in Phase 1): the arm trees are copies of the repository's sources as Phase 1 leaves them (they need the benchmark entry), not exports of the base; neither they nor the capture tree enter the diff. - Systems: from one bgal
solve3Dwithrec_backend=pcg, built from an export that keeps the parts' raw accumulators (code check 2): the last iteration of the first, a middle and the last stage (three boxes), state 1, both halves, so at least six systems; summed bybegin_reduction,add_raw_accum,end_accum. Replaced by ruling R8 (e): the systems are simulated, the three kinds of view set ofsimple_pcg_sparse_tester.f90(dense, preferred orientation, single-axis tilt) with CTF and noise, two halves each, at box 32 and at one production-size box (128, guessed; 256 as well if a 200-iteration reference there takes under an hour), built insimple_test_pcg_fixture.f90: at least six systems besides the control. The reference, the measures, the control, the threshold and the rule stand; an adopted arm is reported as judged on simulated coverage only. The benchmark keeps the list of raw accumulator sets as its second source, and the capture patch with its command lines stays in the run's scratch for the maintainer; the run makes no capture run. (Phase 0 found thatrec_backend=pcgacts in solve3D's stages 7 and 8 only, at bgal's cropped boxes 150 and 162: a bgal capture would have held two boxes, not three.) - Reference: per system, x* is the arm's solution with the smallest true relative residual
|b - H x| / |b|after 200 iterations from zero, computed by the benchmark withapply_normal. It must be at most 1e-4 and two arms must agree on x* within 1e-3 relative; otherwise there is no reference and the run stops. - Measures, at 2 and at 5 iterations from zero: e_k = |x_k - x| / |x| over the support; the half pair's FSC = 0.143 shell of x_k; the true relative residual; the solve's seconds.
- Control, before any real system is read: on a fully covered synthetic set at box 32, built as
mlx-fortran's fixture is (4N plane normals on a golden-angle spiral over the hemisphere, two Gaussian
blobs, with CTF; added to
simple_test_pcg_fixture.f90), P1 must beat P0 in e_2 and e_5 as mlx-fortran measured (0.31 and 0.19 against 0.68 and 0.36). If it does not, the harness or the premise is wrong: stop. If the control's ratio e_2(P1)/e_2(P0) is r, the adoption threshold below is max(0.8, (1 + r)/2), fixed in Progress then and never moved. - Rule: an arm A replaces P0 if and only if on every system e_2(A) <= threshold x e_2(P0) and e_5(A) <= e_5(P0), and A's half-pair FSC = 0.143 shell at two iterations is not lower than P0's by more than one shell. If both arms pass, the lower median e_2 wins, and P1 on a tie (one padded FFT pair fewer per iteration). If the systems disagree, nothing changes and the table is the result.
- After adoption the production gate of section 6 applies. The maps are not judged here (section 6).
- Ruling R9 (2026-11-28, 21:40, after Phase 1 reached both stops of this decision): decision 9 is closed and
P0, the code as it is, stays. The two stops lapse; no reference is sought, the threshold is not fixed, no
arm is solved on the systems of R8 (e) and nothing enters
apply_precond; Phase 2 is the table without a winner (rulings R7, R9 (c)). Its sentences that P0 "beats P1" and that "the premise does not carry" are withdrawn in that form by ruling R10. - Ruling R10 (2026-11-28, 22:50: "200 iterations should never be run with the PCG algorithm. It starts
overfitting at 10 iterations"): the reference of this decision broke the policy (two iterations by default,
a warning above
maxits_pcg=8), a fault of the plan, not of the code. No PCG solve of ten or more iterations is run from Phase 1's end on, in any tree; Phase 1's 200-iteration solutions are no reference and no measure of quality (they fit noise and the unmeasured modes), every e_k Phase 1 recorded is a distance to such a solution, and no ranking of the arms is drawn from them. The decision is closed because its reference was ill-posed and nothing measured gives a reason to change the preconditioner: P0 stays. What was measured is that the arms differ at two and five iterations in their distance to a long solve, and that the plan had no valid yardstick. A later comparison of preconditioners is judged at the production budget against a known truth or by a half-pair measure on data. - The diagnostic application. If decision 9 keeps a preconditioner, the application that only fills the
last iteration's
MRESis dropped at fixed iterations (rtol <= 0) in refinement, whereMRESis then reported for the iteration before the last and marked so; the final reconstruction keeps it. Adopted only if Phase 0 shows that application to be at least 5 % of the master's PCG solve time on bgal (guessed). Ruling R8 (f): the condition is the tracking application's share of the solve's seconds on the PCG benchmark's production-size systems (Phases 1 and 2), not bgal. Phase 1 measured it met (19 % of the two-iteration solve at box 128), and ruling R9 (d) keeps a preconditioner (P0): decision 10 applies in Phase 3. - PCG host arithmetic.
dot_real_volumebecomes line partials (decision 4), computed in parallel over lines and added serially in line order; the engine's whole-array updates and the operator's element-wise passes are threaded where the result is bit for bit the serial one. The bar is decision 6 on the benchmark's solve seconds, with (iii) on the bgal PCG run. Ruling R11 (b, c) (2026-11-29): decision 11 is adopted as a whole (Phase 3 measured it 15.8 % faster at two iterations, the threading alone 6.9 %), over the inner product's tolerance Phase 3 froze, which decision 5 now carries as re-frozen by R11. - Both architectures. Nothing of this run is committed before the Mac read: the benchmarks of each adopted area, before and after, on Apple silicon (owner: Hans or a Mac session; the report lists the commands and the Dell's numbers beside empty Mac columns). A kernel that is slower on the Mac by more than 2 % at the team is restored before the commit. Until then the gain on Apple silicon is unmeasured.
- The continuous kernel's layout. Per slot, a table of the band's half-plane pixels built when the slot is
prepared (h, k, the frequency factors, the shell); per evaluation, a gather pass that fills the value and
the three derivatives of every pixel into contiguous single-precision arrays through an array form of the
B-spline gather in
simple_cartesian_fourier.f90, then an arithmetic pass over those arrays. The double kernel stays as the cc kernel and as the tester's reference. Two forms are measured and closed incont_lm_acceleration.mdand are not retried without a new mechanism: the centred full cube (12 and 18 % slower on bgal) and collecting the 27 taps before contracting them. - Real-data reads. bgal on the Dell is the run's read (
/data/bgal/tst). PfCRT, the set the PCG record is written on, is read by Hans before a commit of Phase 2 or 3; this run does not claim it. Ruling R8 (g): both real-data reads, bgal and PfCRT, are the maintainer's; the report lists the bgal command lines and what this run measured on bgal before the ruling.
Defaults taken without a question: the run name f32_pcg; the benchmark entry pcg_precond_bench; the routine
name of decision 7; the pixel-table component's name; the three stages of decision 9 taken as the first, the
middle one by count and the last; the calibration seed and the two judged seeds as the benchmarks' defaults
and the next two offsets.
Rulings taken at launch and during the run are in the run's spec/rulings.md (R1 to R8, 2026-11-28); each is
written into the decision it changes above. R8 ("We do not need to run experimental data sets. I can do that
myself. We just need to establish speedup and numerical validity") ends every bgal run of the plan: R6 (the bgal
command lines) is replaced, and decisions 3, 6, 8, 9, 10 and 14, section 6's workflow lines and section 7's
bgal stop follow it.
4. Not in this plan¶
The cc objective anywhere; the block kernel's sums (cgemm) and the tables' fills; the 2D or 3D search
strategies; the LM curvature kernels of the polar joint mode and simple_polarft_cont_calc.f90;
simple_lm_solver.f90 and simple_opt_lbfgsb.f90; the pose optimizer's step control, guard and priors (the
10-degree guard that mlx-fortran reports sending one start in eight to another minimum is a separate note);
the PCG's ridge, iteration budgets, priors, closed form and accumulation; the gridding reconstructor; the
matrix-free operator; flex's PCG client beyond what the engine's identical threading gives it; motion
correction and CTF fitting; compile flags; the skills (the report proposes their lines; the maintainer applies
them). Batching continuous refinement across particles in lockstep rounds is the GPU's unit of work and is not
built: on the CPU a thread already holds a particle and the vector dimension is the pixels of one evaluation.
Out of bounds: every file not in the table.
5. Change types and gates¶
| Phase | Kind | Gate |
|---|---|---|
| 0 | measurement | base builds kept; shares, spreads and A-A floors recorded before any edit |
| 1 | tests-only (benchmark entry, no production caller) | fast gate with the registry check; the control of decision 9 |
| 2 | measurement, then result-changing if decision 9 rules | decision 9; then pcg_recon with a stage for the adopted arm, unit_reconstruction, rec3D_backends, the bgal PCG pair of section 6 |
| 3 | identical (threading), then result-changing, last bits (inner products, decision 10) | iterates byte-identical at one thread and at the team for the identical part; decision 5; decision 6; gridding runs byte-identical |
| 4 | result-changing, last bits | decisions 5 to 7; suite=fills identity; unit_pftc_align2D3D |
| 5 | result-changing, last bits | decision 5; the shift-search suites; evaluation counts of section 6 |
| 6 | measurement (workflow) | the 6vxx after-profile inside the before-profile's spread; the bgal pair by decision 8 |
| 7 | result-changing, last bits (objfun=euclid only) |
decisions 5 and 6; unit_cart_align3D, lib_cart_align3D, cont_refine3D_1jxy; cc byte-identical |
| 8 | docs | fast gate |
6. Acceptance¶
- Kernel tolerances: decision 5 (measured on the calibration seed, frozen before the judged seeds; ceilings guessed). The exponential: decision 7.
- Speed: decision 6 (guessed, frozen now), per area on its benchmark:
polar_matching_bench(the block kernel's layout andsuite=shiftmapfor Phase 4; the per-pair route with the shift search for Phase 5),cont_refine3D_bench(its regimessuite=localandsuite=capture) for Phase 7,pcg_precond_benchfor Phases 2 and 3. - Thread identity:
polar_matching_bench suite=fillsreports zero differing entries (measured: the base passes; recorded in Phase 0); the PCG benchmark's iterates at one thread equal the team's, byte for byte. - Shift search (Phase 5): on the benchmark's pairs the cost-and-gradient evaluations per search do not rise by more than 5 % and no search ends in a line-search failure the base did not have (guessed; the base's counts and their spread over three seeds are recorded in Phase 0, and the bound becomes that spread if it is larger).
- Continuous refinement (Phase 7):
cont_refine3D_1jxypasses its floors as they are (median rotation error at most 1.5 degrees, shift 0.2 px, 95 % in the basin; origin: the entry's profile);lib_cart_align3Dpasses; oncont_refine3D_benchthe committed fraction and the passes per solve stay within the spread of three base seeds (measured in Phase 0). - Workflows:
simulated_workflow_6vxx, 20 seeds at one thread, gate rows inside the before-profile's spread and a failure rate not above it; bgalsolve3Dtwice by decision 8. For the PCG phases the same bgal project withrec_backend=pcg: after a last-bits change, decision 8; after an adopted arm of decision 9, the final FSC at 0.143 and at 0.5 not worse than the base's by more than one Fourier shell, and the gridding pair byte-identical. The bgal lines lapsed by ruling R8 (d): the workflow gates are the 6vxx profile and the one-thread identity ofsimulated_workflow_6vxx(gridding and cc paths), with decision 6 (iii) on the simulated entries. - Preconditioner: decision 9.
- Reported, not gated: the bgal PCG run's final maps and FSC curves before and after an adopted arm, with
their paths, for the maintainer's eye; the per-system table of decision 9 for all three arms; the PCG
profile's unaccounted time (iteration seconds minus the accounted subtotal) before and after Phase 3; each
benchmark's breakdown before and after; the bgal runs' whole wall time; the vectoriser's report
(
-fopt-info-vec, from an export build) for each rewritten loop. - The base's known failures are recorded in Phase 0 and left (
nightly_suite_triage.mdlists them).
7. Common rules and stop conditions¶
No new parameter. No floor or tolerance relaxed; a failed tolerance is a diagnosis, and a failed speed bar is
a recorded loser, not a stop. No PCG solve of ten or more iterations, in any tree, and none in a stage or test
the run adds (ruling R10 (a, d): the PCG overfits from about ten iterations; existing tests are not touched for
it). Fix as you go, with a file-table row before the edit. One thread for every identity comparison. Builds
for before/after timings from one snapshot of the tree, interleaved, with the load recorded; no speed verdict
on a loaded machine. Every parallel region added or changed follows the
Fortran guide (per-thread arrays sized by the team at the region, no strings inside, a per-task status raised
after), is checked in its tester with a forced team against the serial result, and is run by hand at the full
thread count, repeated. New scratch in pftc goes into the calculator's per-thread buffers, never a per-call
allocation. The run never uses the maintainer's checkout or its build; /data/bgal and earlier runs'
directories are read only, and a project is copied into the run's scratch before a run writes it. Comments
follow the Fortran guide (no measurements, dates or note paths in code).
A byte-identity exit that fails because the replaced path was wrong: record the defect with its evidence, keep the correct result, and continue; the report lists it under decisions taken under delegation.
Sync: the run is long (nine phases, two 20-seed profiles and several bgal pairs; its length is not estimated). It does not merge master. If master changes a file of the table meanwhile, the maintainer rebases the diff; the run is not re-profiled for a change outside the table.
Stops: a calibration error above its ceiling (decision 5) or the exponential above its bound (decision 7)
after diagnosis; the control of decision 9 not reproduced, or no reference solution (reached in Phase 1, then
lapsed by ruling R9 (a)); an identical part not
byte-identical after diagnosis; a gridding or cc result changed; a file outside the table; a fixed decision
the code contradicts; /data/bgal/tst/3_selection/tst.simple absent (lapsed by ruling R8) or a command the
UI refuses (Phase 0);
cont_refine3D_1jxy failing after Phase 7 (its profile passes every run, so one failure is a regression);
the 6vxx after-profile outside the before-profile's spread.
Gates no ruling may waive: the fast gate after every edit; suite=fills identity; the cc and gridding
byte-identity; cont_refine3D_1jxy; the 6vxx profile of Phase 6; the control of decision 9 before any
verdict; decision 12 before a commit.
8. Phases¶
- Phase 0, baseline and shares (measurement, no edit).
Release and Debug builds, the fast gate, the machine (compiler, cores, load), a base build kept. The
command lines of
phases.mdchecked against the UI's required keys. Twice each with a fixed seed: bgalsolve3Dfrom/data/bgal/tst/3_selection/tst.simple(four parts of six threads); the same withrec_backend=pcg, the second of them from the capture export of decision 9; bgalrefine3Dwithrefine=contfrom the first run's result. Once: the last-bits perturbation of decision 8;polar_matching_bench(per_pair, the block kernel's layoutblock_prod,fills,shiftmap) at 2,500 directions, at 1, 12 and 24 threads, A against A;cont_refine3D_bench(both regimes, both objectives) on three seeds (seed_offset=0to2);unit_pftc_align2D3D,unit_cart_align3D,unit_reconstruction,unit_numerics,lib_cart_align3D,cont_refine3D_1jxy,pcg_recon,rec3D_backendson the bgal project;test=profile target=simulated_workflow_6vxx nseeds=20 nthr=1 ncunits=24as the before-profile. From the records: per area the target loop's thread-seconds and its share of the entry (the tail and the shift refinement fromBENCH/REFINE3D_BENCH_PART*.txtand the benchmark's breakdown; the shift map's scoring from its phase timers; the continuous kernel from theCONTINUOUS POSE WORKsection; the PCG from its profile, its finalisation profile and the unaccounted time; the diagnostic application's share). Exit: the numbers in Progress with their paths; which outputs are deterministic; the two-run spreads; the order of Phases 4 to 8 and the areas measured out (decision 3); decision 10's condition answered. - Phase 1, the preconditioner benchmark.
pcg_precond_bench(measure only, no CTest entry): a synthetic fully covered set and a list of raw accumulator files as its two sources; per system the solves of decision 9 through the operator's public calls; its rows appended to a.tsv; the iterates written as volumes for the comparison across the arms' builds. Exit: fast gate with the registry check; the entry runs on the base (arm P0) on the synthetic set and on one captured system; the control of decision 9 run on the three arm builds and recorded, the threshold fixed. - Phase 2, the preconditioner verdict.
The three arm builds on the six systems; the table and the verdict of decision 9. If an arm wins: it is
written into
apply_precond(the array of code check 3 untouched),pcg_recongains its stage, the policy and the decision log their entry. If none wins: a Progress entry and a decision-log entry, no source edit. Exit: the table and the verdict in Progress; if adopted,pcg_recon,unit_reconstruction,rec3D_backendsand the bgal PCG pair inside section 6, the gridding pair byte-identical; fast gate. Ruling R9 (c): no solve and no source edit; the result is Phase 1's table of the control and its seven variants (Progress and a TSV), the dated decision-log entry (the comparison, the numbers, the mechanism of the missing reference, P0 kept) and the stale sentence of the policy's section 7 corrected (the last fixed iteration does apply the preconditioner, forMRES). Ruling R10 (b): beside every e_k the table, the log and the report say that it is a distance to a 200-iteration solution that fits noise and the unmeasured modes, and rank no arm. - Phase 3, the PCG's host arithmetic.
The identical threading first, judged by bytes; then the line-partial inner product with its tester check
(decision 5) and decision 10 if its condition holds.
Exit: the identical part byte-identical at one thread and at the team on the benchmark's systems and for
flex's client (unit_heterogeneity); decisions 5 and 6 for the rest; the bgal PCG pair by decision 8; the unaccounted time before and after; fast gate. Ruling R9 (e): from here on PCG iterates are judged at 2 and at 5 iterations only, the float32 or threaded build against the double build on the same systems; no measure uses a 200-iteration solution; the "before" is the base arm on the benchmark's systems of R8 (e), box 32 and 128. Ruling R9 (d): decision 10 applies. Ruling R10 (a, d): no solve of ten or more iterations; the benchmark solves 2 and 5 iterations only. - Phase 4, the polar tail.
The single-precision distance conversion; the array exponential with its tester (decision 7); the draw and
the quadrature's weights on it, cumulative sums in double; the shift map's cell scoring in single precision
with the maximum found in a second pass. Each of the three is judged and kept or restored on its own.
Exit: decisions 5 to 7 per item;
suite=fillszero differing entries;unit_pftc_align2D3D; fast gate. - Phase 5, the Euclidean shift-search kernels.
gen_euclid_residual_gradand the Euclidean_8cost kernels with single-precision terms against the single-precision reference, their per-shell sums weighted in double; the single-precision shift matrix without the double pass only if Phase 0 shows that pass above decision 3's 3 %. The cc kernels and the curvature kernels keep the double reference buffer. Exit: decision 5; the evaluation counts of section 6; decision 6;unit_pftc_align2D3D; fast gate. - Phase 6, the workflow gate of the polar changes.
The 6vxx after-profile; bgal
solve3Dtwice. Skipped with a Progress entry if Phases 4 and 5 kept nothing. Exit: inside the before-profile's spread, no gate row failing; decision 8; decision 6 (iii). - Phase 7, the continuous kernel.
The slot's pixel table; the array gather; the float32 Euclidean kernel with the block size of decision 4
from its measured table; the shell residual from the same pass; the cc route on the double kernel as it is.
Exit: decision 5 on three seeds; the cc terms and a cc
cont_refine3D_benchbyte-identical to the base;unit_cart_align3D,lib_cart_align3D,cont_refine3D_1jxy; section 6's continuous items; decision 6 with the bgalrefine=contpair as its production entry; fast gate. - Phase 8, docs and report.
reconstruct3D_pcg_policy.md(the preconditioner as it then is, the inner product,MRES),refine3D_policy.md(the continuous kernel's precision; the tail), a dated entry inpcg_decision_log.mdwith the arms' table whatever the verdict, the losers with their mechanisms, this note's status line and README row, andfloat32_kernels_and_pcg_precond_report.mdbeside this note in the order of the how-to's section 8, with the Mac commands of decision 12, the proposed skill lines and a commit message. Exit: the files of the table changed and nothing else; the report written; the fast gate.
File table¶
| File | What | Phases |
|---|---|---|
src/main/commanders/test/simple_commanders_test_highlevel_pcg.f90 |
new entry pcg_precond_bench; the pcg_recon stage of an adopted arm |
1, 2, 3 |
src/main/commanders/test/simple_commanders_test_highlevel.f90 |
the entry's commander type and interface | 1 |
src/main/commanders/test/simple_test_registry.f90 |
the entry's registry row, if the registry lists measure-only entries | 1 |
src/main/commanders/test/simple_test_pcg_fixture.f90 |
the fully covered synthetic set of decision 9's control | 1 |
src/main/exec/simple_test_exec_highlevel.f90 |
the entry's route | 1 |
src/main/ui/simple_test/simple_test_ui_highlevel.f90 |
the entry's UI and help (Phase 3: the fftw_plans input, accepted by ruling R11 (a); Phase 5: polar_matching_bench's suite=shsrch in its help) |
1, 3, 5 |
doc/policies/test_environment_policy.md |
section 1.3, the programs that are not registered: the new measure-only entry and its reason | 1 |
src/main/volume/simple_reconstructor_pcg.f90 |
an adopted arm in apply_precond; the line-partial inner product; threaded element-wise passes |
2, 3 |
src/main/opt/simple_pcg_solver.f90 |
threaded whole-array updates; decision 10 | 3 |
src/main/strategies/parallelization/simple_rec3D_pcg_strategy.f90 |
the report line of MRES under decision 10, if needed |
3 |
src/main/strategies/parallelization/simple_refine3D_strategy.f90 |
decision 10: refinement's call of the PCG master says it is refinement (added in Phase 3) | 3 |
src/main/pftc/simple_polarft_corr.f90 |
the distance conversion; the Euclidean shift-search kernels | 4, 5 |
src/main/pftc/simple_polarft_shiftmap.f90 |
the cell scoring of shiftmap_draw |
4 |
src/main/pftc/simple_polarft_calc.f90 |
interfaces and per-thread components, if needed | 4, 5 |
src/main/pftc/simple_polarft_core.f90 |
per-thread buffers at new/kill, if needed |
5 |
src/main/pftc/simple_polarft_geom.f90 |
the single-precision shift matrix, if measured in | 5 |
src/main/pftc/simple_polarft_block.f90 |
the block kernel's call of the shared tail, if its signature changes | 4 |
src/main/strategies/search/probabilistic/simple_eul_prob_tab_utils.f90 |
draw_posterior_row, the quadrature's weights |
4 |
src/utils/math/simple_math.f90 |
the array exponential (decision 7) | 4 |
src/main/commanders/test/simple_polar_matching_bench.f90 |
the benchmark's breakdown rows for the tail and the shift search, if needed | 4, 5 |
src/main/commanders/test/simple_commanders_test_highlevel_matchbench.f90 |
the per-pair draws of per_pair and block_prod written under estimated plans for comparing builds (added in Phase 4); the shift search's suite and its per-search records (Phase 5) |
4, 5 |
src/main/cftc/simple_cartft_calc.f90 |
the pixel table; the float32 Euclidean kernel | 7 |
src/main/cftc/simple_cartft_pose_opt_system.f90 |
the kernel's call site, if its signature changes | 7 |
src/main/interp/simple_cartesian_fourier.f90 |
the array form of the B-spline gather | 7 |
doc/policies/KB_Interpolation_Policy.md |
the B-spline gather's name: the array form replaces the point form (added in Phase 7) | 7 |
src/main/commanders/test/simple_commanders_test_highlevel_cont.f90 |
the benchmark's rows, if needed | 7 |
src/main/strategies/search/probabilistic/simple_eul_prob_tab_tester.f90 |
the draw's check against the double draw | 4 |
src/main/pftc/simple_pftc_shsrch_grad_tester.f90 |
the shift search's evaluation counts, if needed | 5 |
src/main/commanders/test/simple_commanders_test_class.f90 |
the suite row of a new tester (the array exponential's, beside simple_math; a PCG tester if pcg_recon cannot hold the inner product's check) |
3, 4 |
src/main/ui/simple_test/simple_test_ui_class.f90 |
the suite= help of that suite |
3, 4 |
doc/policies/3D/reconstruct3D_pcg_policy.md |
the preconditioner, the inner product, MRES |
2, 3, 8 |
doc/policies/3D/refine3D_policy.md |
the continuous kernel's precision; the tail | 8 |
doc/implementation_notes/completed/pcg_decision_log.md |
the dated entry (Phase 3: the inner product and the threading, ruling R11 (c)) | 2, 3, 8 |
doc/implementation_notes/README.md |
this note's row | 8 |
doc/implementation_notes/planned/float32_kernels_and_pcg_precond.md |
this note: Progress | each |
doc/implementation_notes/planned/float32_kernels_and_pcg_precond_report.md |
new: the run's report | 8 |
A listed x.f90 also covers x_tester.f90 (the fence's companion rule).
Progress¶
- 2026-11-28, Phase 0, baseline and shares (measurement; no source file changed). The Dell (Oracle Linux 8.10,
Intel Core Ultra 9 285: CPUs 0-7 performance cores, 8-23 efficiency cores, no hyperthreading, 62 GB). Base: the
copy's HEAD
fa833e0e1, which adds only documents (this plan, its README row, a pointer incont_lm_acceleration.md) to the plan's pind416d2898, so rulings R3 needed no re-pin and the code base isd416d2898; the launch differences are this note's edits made at preparation (the continuous benchmark's regimes,block_prod, four file-table rows). gfortran 15.2.1 (gcc-toolset-15), CMake 3.26.5, Python for the build/usr/bin/python3.12, the bundled OpenBLAS 0.3.34. Every tree is configured withcmake -S <src> -B <tree> -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DNICE=OFF -DUSE_ARCHOPT=ON -DFORTLS=OFF -DPython3_EXECUTABLE=/usr/bin/python3.12(debugfor the Debug tree), thenmake,make install,scripts/run_fast_gate.sh <tree>. Load: 0.0 at the start; the run's own jobs were the only load throughout (no foreign job appeared); the load before and after every timing is in itsbench_runs.log,run_infoorload.log. Files changed: this note only (rulings R1, R4 and R8 written into decisions 3, 6, 8, 9, 10 and 14, section 6, section 7 and after the defaults; this entry). Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch(=/data2/agent_runs_home/f32_pcg/scratch); scripts inkeep/tools/, logs inlogs/. - Build environment. The base needs the GTK 3 development files through pkg-config (since
ca87dcf6e); the Dell has the GTK 3.22.30 runtime but no development package and no root. As the runstate_sweepdid, a runtime-only pkg-config file (keep/gtk3_shim, libraries only; SIMPLE compiles no C against GTK headers, and GTK links onlysimple_viewerandsimple_test_exec) is put onPKG_CONFIG_PATHbykeep/tools/build_tree.sh. The OpenBLAS and gtk-fortran caches were copied read only fromstate_sweep's tree (same recipe; the gtk-fortran tarball's checksum is the pinned one), so neither was rebuilt. - Builds and fast gate: the base export
keep/src_base(git archive fa833e0e1plus this note) built Release inkeep/build_base, kept for every later comparison and never rebuilt; the run's treesrepo/build(Release) andrepo/build_debug(Debug). Fast gate 15 of 15 on all three (11.7, 12.3 and 43.7 s;logs/build_base.log,build_repo.log,build_debug.log). - Command lines checked against the base build's UI: every key of the bgal
solve3Dline (withrec_backend=pcg), of therefine=contline and of the test entries is in the generated argument list (keep/tools/args_base.txt; the parser refuses only keys outside it), and the required keys ofsolve3Dandrefine3D(pgrp,mskdiam,nthr) are present. Nothing was dropped. - Two experimental trees, never in the diff:
keep/src_timers/keep/build_timers, the base with per-thread wall-clock accumulators around the target loops and counters in L-BFGS-B (keep/patches/timers.patch, made bykeep/patches/timers_files/apply_timers.py): the distance conversioneuclid_dists_from_crvec, the drawdraw_posterior_row, the quadratureinpl_quadrature, the double and single shift matrices, the Euclidean shift-search kernelsgen_euclid_residual_gradand the cost-only_8kernels, the continuous kernelspose_normal_termsandshift_normal_terms, L-BFGS-B's searches, cost-and-gradient evaluations, line-search failures (ABNORMAL_TERMINATION_IN_LNSRCH) and line-search restarts; written into the refine3D cost records (BENCH/) and intopolar_matching_diag.tsvandpolar_fill_diag.tsvof the benchmark. It changes no result: itssimulated_workflow_6vxxexecution and itscont_refine3D_benchrun are byte-identical to the base's (below). And the capture patch of decision 9 (keep/patches/capture.patch, with its build and run commands inkeep/patches/capture_commands.md): it moves the parts' raw PCG accumulators aside instead of deleting them. Ruling R8 ended its use before a capture run; the patch is kept for the maintainer. - Ruling R8 (2026-11-28, 19:00, during this phase): no experimental data from then on. What was run on bgal before it is context, judged by nothing; the rest of this entry uses the benchmarks and simulated entries.
- bgal before the ruling (beta-galactosidase, 4,967 particles, box 256, D2, four parts of six threads, the
command of the 2026-11-15 run with
SIMPLE_SEED=20261120; records, final maps and FSC inkeep/bgal/<run>/): two gridding runs, 12:03 and 12:45 wall, and the perturbation of decision 8 (three parts of eight threads), 12:27. The base does not reproduce itself. The two runs are byte-identical through iteration 66 (every map of stages 1-3, every per-iteration resolution file, every fill counter of iterations 1-67) and part at the map symmetrization that ends stage 4 (iteration 67): the reconstruction after it already differs (cFAR 0.454 and 0.506), stage 5 starts at 7.1 and 6.8 A, and the runs end at iterations 94 and 96. The cause is the symmetry-axis search (symmetrize_map,volpft_srch4symaxis): run by hand on one identical input map (symaxis_search, the stage-3 map of run 1), it returned two different D2 axes in two repeats at six threads (Euler 160.3/119.7/92.2 with correlation 0.99628, 333.9/152.4/353.2 with 0.99620) and the same axis (the second) in two repeats at one thread (keep/symchk/). Its ten candidate axes are refined in an OpenMP loop by the simplex with random restarts drawn fromrandom_number, whose streams are per thread; since0754e25cc(2026-11-25, aftertable_gemm's base, whose runs were byte-identical) the ten starts are distinct, so the axis found depends on which thread refines which start. This is a defect found, outside the file table, not fixed here:solve3Dwithpgrp_start=c1is not reproducible at a fixed seed with more than one thread. The three runs end at the same resolution (FSC 0.143 at 3.71, 3.71 and 3.75 A; 0.5 at 4.29, 4.29, 4.24 A) in two symmetry frames: run 2 and the perturbation share one (final maps correlate 0.998 whole and inside the mask; cross-FSC 0.5 at Nyquist), run 1 has the other (0.35 and 0.27 as they are; afterdock_volpair0.977 and 0.975, cross-FSC 0.143 at Nyquist;keep/bgal/cmp_*). The bgal PCG run was stopped by the ruling at iteration 50, before its PCG stages. Two facts of the code check for decision 9 came from it:solve3Dusesrec_backend=pcgonly from stage 7 (PCG_START_STAGE = 7), at bgal's cropped boxes 150 and 162, so a capture would have held two boxes, not three, of about 1.3 and 1.6 GB per iteration; and the production engine applies the preconditioner once more on the last fixed iteration forMRES(track_preconditioned_residualis set insimple_reconstructor_pcg.f90), whichreconstruct3D_pcg_policy.mdsection 7 says it does not (a stale sentence for Phase 8). In the bgal cost records the shift refinement was a third of the workers' thread-seconds (3,434 of 10,307 in run 1), the score loop 16 %, the shift map's cell selection 0.9 %. - Test entries on the base (
repo/build, CTest;logs/p0_ctest_*.log):unit_numerics,unit_reconstruction,unit_pftc_align2D3D,unit_cart_align3Dpass;lib_cart_align3Dpasses (11 s);pcg_reconpasses (0.8 s, twelve stages on small fixtures);cont_refine3D_1jxypasses (272 s; median rotation error 0.96 and 0.23 degrees in stages a and b against the floor 1.5, all gate rows pass,keep/bench/p0_cont_refine3D_1jxy_metrics.tsv).rec3D_backendsran on the bgal project only and lapsed with ruling R8. No failure of the base was met; the known ones ofnightly_suite_triage.md(the HHCNN thread identity ofunit_numericson Ubuntu, the 6vxx missed maps) are not reproduced here except as the profile shows below. - Thread identity of the probability tables (
polar_matching_bench suite=fills nspace=2500 nstates=1 nthr=24,keep/bench/p0_fills_base/): eight routes, each at one thread against the team of 24, a third of the batch, three parts and three parts with the earlier parts perturbed: 48 comparisons, zero differing entries in every category. The shift maps' team identity (suite=shiftmap): 64 particles x 16 candidates, one thread against 24, zero maps differ, window and screen. - Which outputs are deterministic.
simulated_workflow_6vxxat one thread, seed offset 0 (profile nseeds=1 nthr=1 ncunits=1 keep_outputs=yes,keep/tools/ident_6vxx.sh, three base executions and one of the timer tree, each pinned to two performance cores):test=identityfinds the 185 declared outputs identical, base A against B, A against C and A against the timer tree (keep/identity/cmp_*). This is the one-thread identity case of ruling R8 for the gridding and cc paths;keep/identity/p0_base_a/is kept whole as its reference.cont_refine3D_benchat 24 threads, seed offset 0, twice: every map, the four cases' particle poses (print_project_field oritype=ptcl3D) andmetrics.tsvidentical, the sigma2 stores differing only in their 8-byte identity stamp; the timer tree's poses identical too. bgalsolve3Dis not deterministic (above). -
Shares (decision 3; ruling R8 (b)). Target loop thread-seconds against the case's thread-seconds. The benchmarks' numbers are the timer tree's sums over the three timed repeats (
keep/bench/p0_polar_timers/ polar_matching_diag.tsv, the production tile B=16, R=32 forblock_prod); one thread is pinned to CPU 0. The 6vxx entry is the timer execution'ssolve3D(one thread, 351 s; its matcher 76.3 thread-s, its fills 37.6;keep/identity/p0_timers_6vxx_solve3D_shares.tsv). The continuous kernel is from the timer run ofcont_refine3D_benchseed 0 against each case'srefine3D(24 threads;keep/bench/p0_cont_table.tsv). The timers add about 2.5 % to the benchmark's wall (block_prod, one thread: 2.36 s per repeat against 2.30).area (phase) loop case loop thread-s case thread-s share tail (4a) distance conversion block_prod, 24 threads4.82 134.1 3.6 % block_prod, 1 thread0.169 7.07 2.4 % per_pair, 24 / 14.58 / 0.169 343.1 / 18.0 1.3 % / 0.9 % 6vxx solve3D0.40 351 0.11 % (0.5 % of the matcher) tail (4b) draw ( draw_posterior_row)block_prod, 24 / 143.4 / 2.98 134.1 / 7.07 32 % / 42 % per_pair, 24 / 142.6 / 3.14 343.1 / 18.0 12 % / 17 % 6vxx solve3D2.25 351 0.64 % (2.9 % of the matcher) quadrature ( inpl_quadrature)6vxx solve3D0 (not called by the 3D tables) 0 shift map (4c) cell scoring shiftmap, window map, 24 / 1 threads (unpinned)18.6 / 19.1 us 387 / 262 us per map 4.8 % / 7.3 % shiftmap, screen map, 24 / 1128 / 129 us 2,096 / 1,471 us 6.1 % / 8.8 % 6vxx solve3D2.45 351 0.70 % (3.2 % of the matcher) shift search (5) gen_euclid_residual_grad(the cost-only_8kernels: 0 calls)6vxx solve3D4.16 351 1.2 % (5.5 % of the matcher, 16.5 % of the shift refinement) the whole shift refinement 6vxx solve3D25.2 351 7.2 % (33 % of the matcher) the double shift matrix, direct calls 6vxx shift refinement 1.11 25.2 4.4 % (6.5 % with the calls through the single-precision wrapper) continuous (7) pose_normal_terms(97-99 % of the search)local, Euclid44.7 377.8 11.8 % capture, Euclid6.44 314.6 2.0 % local/capture, cc (not edited)45.8 / 6.65 350.4 / 295.0 13.1 % / 2.3 % PCG (3) inner products, element-wise passes the PCG benchmark of Phase 1 not measurable before Phase 1 (ruling R8 (b)) Measured out (decision 3, below 3 % on every case): none. The distance conversion is above 3 % in one case only (
block_prodat 24 threads, 3.6 %); the continuous kernel in one regime only (local, 11.8 %;capture2.0 %). Phase 5's optional item, the single-precision shift matrix without the double pass, is measured in: the double matrix's direct calls are 4.4 % of the shift refinement's thread-seconds (above decision 3's 3 %). The order the shares give, by the production-entry shares (6vxxsolve3D, the continuous benchmark): Phase 7 first (11.8 % in the local regime), then Phases 4 and 5 in the written order (1.45 and 1.2 % ofsolve3D, within two points); Phase 3's share is unknown until Phase 1's benchmark. Ruling R4: the run keeps the written order 0 to 8. - Decision 10: its condition moved to the PCG benchmark's production-size systems (ruling R8 (f)); Phase 0 has no number for it. The engine appliesn + 1preconditioner applications in a solve ofniterations, the last forMRESonly; at the production defaultmaxits_pcg=2that is one of three. - The shift search's counts (section 6), from the timer tree. The fills harness's one-thread reference fills (suite=fillsat seed offsets 0, 1, 2;keep/bench/p0_fills_timers_s*/polar_fill_diag.tsv), dense 3D route: 8,256 / 8,384 / 8,512 searches, 11.60 / 11.72 / 11.67 cost-and-gradient evaluations per search (spread 1.0 %), 240 / 255 / 257 line-search failures (2.9-3.0 % of the searches) and 260 / 284 / 283 line-search restarts. Over the eight routes: 45,824 / 46,080 / 46,336 searches, 11.00 / 11.03 / 11.03 evaluations per search (spread 0.26 %; up to 7 % on the small neighbourhood routes of 640 searches), 1,191 / 1,159 / 1,207 line-search failures (2.5-2.6 %); per route inkeep/bench/p0_lbfgsb_counts.tsv. In the 6vxxsolve3D(one seed): 69,340 searches, 9.26 evaluations per search, 1,229 line-search failures (1.8 %), 1,539 restarts. The base has line-search failures: section 6's rule is "no failure the base did not have", judged per search on the same pairs. No suite ofpolar_matching_benchruns the shift search at this base (per_pairscores at zero shift): Phase 5's "per_pair with the shift search" needs the benchmark rows its file-table row allows, and the fills harness's reference fills above are the base's counts on the benchmark's pairs. - The continuous benchmark on three seeds (cont_refine3D_bench nthr=24 seed_offset=0,1,2; seed 0 twice; 10,000 particles each): every solve committed (committed fraction 1.0 in every case and seed); passes per solve, local Euclid 4.7199 / 4.7221 / 4.7184 (spread 0.08 %), capture Euclid 6.9624 / 6.9585 / 6.9461 (0.23 %); pixel-evaluations local 579.2 / 579.5 / 579.0 million, capture 120.6 / 120.5 / 120.3 million; the search's thread-ns per pixel-evaluation (the kernel is 97-99 % of it) local 75.0 / 73.8 (seed 0 twice) / 73.7 / 77.2, capture 54.2 / 53.5 / 53.3 / 52.3; fraction in the basin 1.0 except 0.9999 and 0.9997 (capture, seeds 1 and 2). - A-A spreads that decision 6 is judged against (two runs each; the phases repeat them beside their change).polar_matching_bench nspace=2500 nstates=1, best of three walls (keep/bench/p0_polar_base/):block_prod(B=16) 1.802 / 1.816 s at 24 threads (0.8 %), 2.306 / 2.299 s pinned at one thread (0.3 %);per_pair4.605 / 4.419 s at 24 (4.1 %), 5.981 / 5.945 s pinned (0.6 %). Unpinned teams of 12 and 1 scatter by up to 29 % (threads on efficiency cores): only the team of 24 and the pinned thread are usable.cont_refine3D_bench, seed 0 twice: invocation wall 182.5 / 184.9 s (1.3 %); search thread-seconds local Euclid 43.46 / 42.73 (1.7 %), capture Euclid 6.54 / 6.45 (1.4 %).simulated_workflow_6vxx, seed 0, three base executions at one thread concurrently on separate pairs of performance cores (keep/identity/p0_6vxx_aa.tsv): wall 587.5 / 586.9 / 589.1 s (0.37 %),solve3D348.5 / 348.2 / 350.0 s (0.5 %), its fills 36.88 / 36.71 / 37.31 thread-s (1.6 %); the timer tree's execution 590.3 s. - The 6vxx before-profile (test=profile target=simulated_workflow_6vxx nseeds=20 nthr=1 ncunits=24 keep_outputs=no,keep/profiles/p0_base,keep/tools/profile_6vxx.sh; 27:51 wall, twelve executions at a time, 634-1,124 s each; nothing else ran beside it): 15 of 20 executions pass, failure rate 0.25. Medians: the map's correlation with the truth 0.896 (spread 0.021), FSC 0.143 against the truth 4.23 A (spread 0.21), pose error of particle pairs 0.93 degrees, fraction of pairs within 5 degrees 0.969. The five failures are the base's and are left: seed offset 3 at a truth correlation of 0.797 against the floor 0.80, its only failed row; offsets 4, 11, 16 and 19 wrong maps (truth correlation 0.50-0.63, FSC 28-62 A, pair pose error 67-78 degrees).table_gemm's base failed the same five and offset 7 (0.30). The failed executions' logs and metrics are kept for Phase 6's comparison; their volumes and stacks were deleted. - What it means, in short: the base builds and gates on the Dell; the probability tables and shift maps are thread-identical;simulated_workflow_6vxxat one thread andcont_refine3D_benchreproduce themselves bit for bit, which gives the later phases their identity cases, while bgalsolve3Ddoes not reproduce itself since the symmetry-axis search became thread-dependent (a defect for the maintainer, outside this run). No area is measured out: the draw dominates the benchmark's per-pair tail (a third to two fifths of the block kernel's thread-seconds) but is under 1 % of the simulatedsolve3D; the shift refinement is a third of the 6vxx matcher and its Euclidean kernel a sixth of that; the continuous kernel is the whole continuous search, 12 % of the local regime and 2 % of the capture regime. Exit: the numbers in Progress with their paths, the deterministic outputs, the two-run spreads, the order and the areas measured out (none); decision 10's condition moved to Phase 1's benchmark by ruling R8 (f): met. - 2026-11-28, Phase 1, the preconditioner benchmark: stopped at the control of decision 9 (both of its stops, section 7), then closed by rulings R9 and R10 and DONE. The Dell, basefa833e0e1, the run's treerepo/build(configured as in Phase 0); load 0.5-2 outside the run's own jobs. Files changed:simple_test_pcg_fixture.f90(the synthetic systems),simple_commanders_test_highlevel_pcg.f90(the entry),simple_commanders_test_highlevel.f90(its type and interface),simple_test_exec_highlevel.f90(its route),simple_test_ui_highlevel.f90(its UI),doc/policies/test_environment_policy.md(section 1.3, the programs that are not registered; added to the file table first), this note (rulings R5, R9 and R10 in decision 9, R9 and R10 in decision 10, section 7 and the Phase 2 and 3 notes, the file table, this entry). Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch. - The entrysimple_test_exec test=pcg_precond_benchas it ends the phase (measure only: no CTest entry, no registry row, no threshold). It solves each system through the operator's public calls as a worker and the distributed master do (planes accumulated, the raw accumulator written,end_accumwith the kernel operator, the production sphere's support) with 2 iterations, the production budget, and 5 from zero, never longer (ruling R10 (c): the PCG overfits from about ten iterations, as its help says), and appends per system and iteration count the solve's seconds, the engine's relative residual (RESID) and preconditioned residual (MRES), the true relative residual |b - Hx|/|b|, the distance |x - truth|/|truth| to a synthetic system's truth, one preconditioner application's seconds (median of five) and the operator's data scale to./pcg_precond_bench.tsv; it writes every iterate as<system>_it<k>.mrc, a synthetic system's truth as<system>_truth.mrcand the half pairs' Fourier shell correlation (FSC) to./pcg_precond_fsc.tsv. Its suites:control(box 32, 4 x box plane normals on a golden-angle spiral over the hemisphere, two Gaussian blobs, five contrast-transfer-function (CTF) groups at 300 kV and 1.0-3.0 um defocus, no noise),systems(ruling R8 (e): dense, preferred-orientation within 20 degrees and single-axis tilt view sets of an atomic phantom, the sparse-sampling tester's 400, 200 and 34 views at box 32 scaled with the box, CTF, white noise at a signal-to-noise power ratio of 0.1 drawn as a real image's, two halves each, atbox=),raw(fname=: one set per line, label, support radius, its raw accumulator files in part order, reduced withbegin_reduction/add_raw_accumas the master reduces them;controlandsystemslist what they write in./pcg_precond_systems.txt) andcompare(dir1=,dir2=: each iterate of dir1 against dir2's volume of the same name, another build's iterate at the same count, or without one the system's truth). Two decisions of its construction (revisable, so recorded here): (1) the true residual of an iterate is read as the initial residual of a solve started from it (solve_accumwithmaxits=1; the engine evaluatesb - Hxwith the operator before iterating), since the right-hand side is private; (2) the production sphere's support is installed as a hard 0/1 window (set_window_sphere,get_solve_support,set_window_volume): the operator, the right-hand side and the preconditioner read only the support (window > 0), so the system is production's, while a soft window divides out at a warm start with a floor of 0.1 and capped the readout at 1e-3. With it the readout equals the engine's residual wherever the engine recomputes it, and the residuals are those of the soft-window solve to the last digit. The truth column is right: on the noiseless control the iterate's least-squares scale against the truth is 1.003 (correlation 0.9996) and the distance 0.070 at two iterations and 0.029 at five (keep/precond/p1_r10_check_control); on the noisy systems the iterates' noise at high frequency outweighs the phantom and the whole-band distance exceeds 1 (1.2 to 5.4 at box 32), where the half pairs' FSC is the measure. The raw source reproduced all 18 iterates of a box-32systemsrun byte for byte (keep/precond/ p1_try_raw32). An independent review of the diff found no correctness defect; its low-severity points were fixed. After the change of ruling R10: rebuilt, fast gate 15 of 15 with the registry check (logs/fast_gate_p1_r10.log), the entry run once at box 32 (suite=systems, thencompareof the run against itself: every distance 0;keep/precond/p1_r10_systems32). The measurements below were taken with the earlier version of the entry, which also solved 200 iterations; ruling R10 removed that solve. - The arm trees (ruling R5, applied here for the first time):keep/src_P0,src_P1,src_P2are copies of the repository's sources (git ls-files -co --exclude-standard); P1's patch (keep/patches/P1.patch) makesapply_precondtake the path it takes whenl_precondis false (the support mask only); P2's (keep/patches/P2.patch) multiplies bymerge(precond, pmin, precond > 0),pminthe smallest positive entry of the multiplier on the padded lattice (all positive entries lie inside the native Nyquist sphere), found by an OpenMP min-reduction in each call; the arraypreconditself is untouched (code check 3). The three arms solved identical systems (their raw accumulators are byte-identical). Their build trees were deleted for space after ruling R9. - The control on the three arms (suite=control nthr=8,keep/precond/p1_control/, matrices bykeep/tools/emat.py). Every distance in this bullet and the next is the distance to a 200-iteration solution, which fits noise and the operator's unmeasured modes (ruling R10 (b)): it is no reference and no measure of quality, and no arm is ranked by it. Data scale 72.5, so lambda = 1e-3 is 1.4e-5 of it. 200-iteration true residuals: P0 1.21e-5, P2 1.45e-5, P1 2.42e-3 (its solve breaks down,indefinite, at iteration 180). P0's and P2's 200-iteration solutions differ by 3.7 % although both residuals are below 1e-4, so decision 9's rule finds no reference (it asks for 1e-3). The distances of the iterates to P0's 200-iteration solution: after two iterations 0.076 (P0), 0.109 (P1), 0.075 (P2); after five 0.040, 0.025, 0.039; to P2's: 0.084, 0.116, 0.083 and 0.056, 0.047, 0.055. The plan quotes mlx-fortran's control at 0.31 and 0.19 for P1 against 0.68 and 0.36 for P0, against a yardstick this run cannot check. - The seven variants (a scratch-only patch on the arm trees,keep/patches/diag_control.patch: the control's plane count throughnspace=, no CTF throughctf=no, no support throughmskdiam=0;keep/precond/p1_diag/<variant>/): as specified; without CTF; 1,608 and 6,434 normals (full coverage at the native and at the padded Nyquist radius); 6,434 without CTF; without a support at 128 and at 6,434 normals. In every variant the arms differ at two and at five iterations in their distance to a long solve (after two, P1's 0.106-0.244 against P0's 0.049-0.084), and no variant has two arms' 200-iteration solutions within 1e-3 (1.2 % to 48 %). The mechanism of the missing reference: with lambda = 1e-3 the operator's least-measured modes (the cube's corners beyond the native Nyquist sphere, unmeasured voxels) have eigenvalues near lambda, so the exact solution carries their share of b divided by lambda; P0's preconditioner is zero there by design and its Krylov space never enters them, P2's is tiny there and enters them slowly, so residuals below 1e-4 leave the long solves percent apart. The plan had no valid yardstick. - The production-size systems on P0 (suite=systems box=128 nthr=24, the repository build, nothing else running;keep/precond/p1_systems128_P0/): decision 10's condition is met (ruling R8 (f)): one preconditioner application takes 0.24-0.26 s, 18.8-19.4 % of the two-iteration solve (1.27-1.36 s), and the tracking application is one of its three. At two iterations the half pairs' FSC = 0.143 lies at 3.62 A (dense), 3.49 A (preferred orientation) and 19.2 A (tilt). That the earlier version's long solves broke down on the tilt sets and lost half-pair FSC is consistent with the known overfitting of the PCG past about ten iterations. - Rulings R9 (2026-11-28, 21:40, "Close and resume") and R10 (22:50, "200 iterations should never be run with the PCG algorithm. It starts overfitting at 10 iterations"), both applied here for the first time: decision 9 is closed because its reference was ill-posed and nothing measured gives a reason to change the preconditioner. Verdict: P0, the preconditioner as it is, stays. The two stops lapse; no reference is sought, the adoption threshold is not fixed, no arm is solved on the systems of ruling R8 (e) andapply_precondis not edited. What was measured is that the arms differ at two and five iterations in their distance to a long solve, and that the plan had no valid yardstick; a later comparison of preconditioners is judged at the production budget against a known truth or by a half-pair measure on data, for which the entry now writes the truth, the distance to it and the half pairs' FSC. Kept for the maintainer's own runs: the arm sourceskeep/src_P0,src_P1,src_P2,keep/patches/P1.patch,P2.patch,diag_control.patch, the capture patch and its commands (Phase 0) and the evidence underkeep/precond/. - Exit items (as ruled): fast gate with the registry check, 15 of 15 after the last edit of the entry (logs/fast_gate_p1_r10.log); the entry runs on the base (P0) on the synthetic control and on the systems at box 32 and at the production size 128 (keep/precond/p1_try_systems32,p1_systems128_P0,p1_r10_systems32); the list-of-raw-accumulator-sets source exercised on the sets the entry wrote, all iterates byte-identical (keep/precond/p1_try_raw32); the control run on the three arm builds and recorded, the threshold not fixed (ruling R9 (a)); decision 10's condition answered on the production-size systems: met, 18.8-19.4 % (ruling R8 (f)); the long solve taken out of the entry (ruling R10 (c)). - What it means, in short: the run has a measure-only PCG benchmark that drives the operator exactly as the distributed master does, on synthetic systems or on any reconstruction's raw accumulators, at the production budget of two iterations and at five, and reads for every iterate the true residual, the distance to a known truth and the half pairs' FSC. Decision 9's comparison had no valid yardstick, since a 200-iteration solution is overfitted, so it changed nothing: the sampling-density preconditioner stays, and the tracking application that fills the lastMRESis a fifth of a two-iteration solve, which gives Phase 3's decision 10 its condition. - 2026-11-28, Phase 2, the preconditioner verdict: the table without a winner (rulings R7, R9 (c)); DONE, no solve and no source edit. The Dell; no build or program was run beyond the fast gate. Files changed:doc/implementation_notes/completed/pcg_decision_log.md(the dated entry),doc/policies/3D/reconstruct3D_pcg_policy.md(section 7: the stale sentence that the final fixed iteration skips the preconditioner), this note (this entry). Ruling R9 (c) is applied here for the first time. Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch. - The table:keep/precond/decision9_table.tsv(bykeep/tools/phase2_table.py), one row per variant, arm (P0 the preconditioner as it is, P1 none, P2 P0 with its zeros replaced by its smallest positive value) and iteration count, from Phase 1's runs (keep/precond/p1_control,p1_diag/<variant>): the solve's iterations, stop, true relative residual, the engine'sRESIDandMRES, the seconds, one preconditioner application's seconds, the data scale, and each iterate's distance to the three arms' 200-iteration solutions. Every such distance is a distance to a 200-iteration solution, which fits noise and the operator's unmeasured modes: no reference and no measure of quality, and no arm is ranked by it (ruling R10 (b)). The control as specified was run on the first arm builds and again on the diagnostic ones: byte-identical iterates. The seconds come from runs at eight threads right after the arm builds (load 12.8, the run's own, falling) and are no speed measure. - The control as specified (box 32, 128 plane normals on a golden-angle spiral over the hemisphere, two Gaussian blobs, contrast transfer function (CTF), no noise; the operator's data scale 72.5, so lambda = 1e-3 is 1.4e-5 of it):arm true resid. 2 it. 5 it. 200 it. (stop) dist. to P0's 200 it., at 2 / 5 dist. to P2's 200 it., at 2 / 5 P0 1.31e-2 5.64e-4 1.21e-5 (fixed) 0.076 / 0.040 0.084 / 0.056 P1 6.96e-2 4.97e-3 2.42e-3 (breakdown at 180) 0.109 / 0.025 0.116 / 0.047 P2 1.32e-2 5.55e-4 1.45e-5 (fixed) 0.075 / 0.039 0.083 / 0.055 P0's and P2's 200-iteration solutions lie 3.7 % apart; decision 9's rule (1e-3) finds no reference. The plan quotes mlx-fortran at 0.31 and 0.19 for P1 against 0.68 and 0.36 for P0, against a yardstick not checkable here. - The seven variants (the six besides the specified one by a scratch-only patch,
keep/patches/diag_control.patch):variant P0 and P2's 200-it. solutions apart dist. to P0's 200 it. after 2 it., P0 / P1 / P2 after 5 it. as specified (128 normals) 3.7 % 0.076 / 0.109 / 0.075 0.040 / 0.025 / 0.039 no CTF 1.2 % 0.057 / 0.244 / 0.057 0.029 / 0.025 / 0.029 1,608 normals 3.4 % 0.063 / 0.107 / 0.062 0.033 / 0.020 / 0.032 6,434 normals 3.4 % 0.062 / 0.106 / 0.061 0.033 / 0.020 / 0.032 6,434 normals, no CTF 1.2 % 0.051 / 0.243 / 0.051 0.026 / 0.022 / 0.025 no support 18 % (all three break down at 22-54 it.) 0.149 / 0.213 / 0.149 0.135 / 0.138 / 0.135 no support, 6,434 normals 48 % (P1, P2 break down at 85, 131 it.) 0.049 / 0.160 / 0.049 0.009 / 0.028 / 0.009 P1's 200-iteration solution lies 4 % to 383 % from the others' (relative to the other's norm; 383 % in the control as specified, where its solve broke down at iteration 180). The missing reference has one mechanism: with lambda = 1e-3 the operator's least-measured modes (the cube's corners beyond the native Nyquist sphere, unmeasured voxels) have eigenvalues near lambda, so the exact solution carries their share of b divided by lambda; P0's preconditioner is zero there by design and its Krylov space never enters them, P2's is tiny there and enters them slowly. The breakdowns of the long solves are consistent with the known overfitting of the PCG past about ten iterations. - Verdict (rulings R9, R10): decision 9 is closed because its reference was ill-posed and nothing measured gives a reason to change the preconditioner; P0 stays,
apply_precondis not edited, nopcg_reconstage is added. The decision log's entry says the same with the numbers, the mechanism and the lesson (a later comparison is judged at the production budget against a known truth or by a half-pair measure on data); the backend overview (pcg_backend_overview.md) has no paragraph the verdict changes. The policy's section 7 now says what the code does: the final iteration applies the preconditioner once more, only forMRES, about a fifth of a two-iteration solve at box 128 (Phase 1's measurement), and clients without tracking skip it. - Exit items (as ruled, R9 (c)): the table and the verdict in Progress and as a TSV (above); the decision-log entry and the policy sentence; no source edit, so nopcg_recon,unit_reconstructionor identity run is owed; fast gate 15 of 15 after the edits (logs/fast_gate_p2.log). - What it means, in short: the preconditioner comparison ends without a change. The run's yardstick, a long solve, measured the overfitting of the solver rather than the quality of its iterates, so the arms' differing distances to it at two and five iterations decide nothing; the preconditioner as it is stays, and the entry with its truth and half-pair columns is there for a comparison done the right way. - 2026-11-28 23:22, Phase 3, decision 5 frozen before the judged seeds: the PCG inner product's tolerance is 7.83e-10 relative to the double sum, twice the largest error on the calibration seed 42 (3.911e-10:pcg_reconstage 13, box 128, the products x.x with x in (0,1), r.r, r.Dr with D > 0, r.(r+s); 1.78e-10 to 3.91e-10); ceiling 1e-6. Not "at float32's floor" (about 300 times below float32's unit roundoff of the value), so twice, not four times. The judged seeds are 43 and 44. - 2026-11-28, Phase 3, the PCG's host arithmetic: decision 10 adopted; decision 11 not adopted (the threading a loser of decision 6 at 6.9 %, the line-partial inner product failed decision 5 on a judged seed); DONE. (Superseded in part on 2026-11-29 by ruling R11: decision 11 adopted as a whole, see the entry after this one; the record below stands as measured.) The Dell; builds in the repository's tree, every comparison on frozen copies (keep/frozen/p3_base,p3_ident,p3_final;p3_final2is the phase's last build and differs fromp3_finalonly in the report lines' marking condition), the verdict's timing with no foreign load (byps). Files changed in this phase:src/main/opt/simple_pcg_solver.f90(optionmres_at_exit, outcome fieldfinal_rel_residual_m_iter),src/main/volume/simple_reconstructor_pcg.f90(optionalmres_at_exitonsolve_accum,solve_with_cold_restartandsolve_regularized; the report lines markMRES(it-1)=and-> (it-1)),src/main/strategies/parallelization/simple_rec3D_pcg_strategy.f90(the master's optionalrefinement; the diagnostics linefinal_rel_resid_m_iter),src/main/strategies/parallelization/simple_refine3D_strategy.f90(refinement=.true.; its file-table row added in this phase),src/main/commanders/test/simple_commanders_test_highlevel_pcg.f90(the benchmark's per-system PCG profile<label>_profile.txtand its inputfftw_plans=estimate|measure;pcg_reconstage 13),src/main/ui/simple_test/simple_test_ui_highlevel.f90(the input's help; outside this phase's file-table row, edited by shell, and stopped by the driver's file fence; accepted by ruling R11 (a), which added Phase 3 to the row:fftw_plansis an existing key, throughpolar_matching_bench, so no new parameter),doc/policies/3D/reconstruct3D_pcg_policy.md(section 7: decision 10; section 9: stage 13), this note (the file-table row, the freeze line above, this entry). Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch; the evidence is inkeep/precond/p3/. - Before, and decision 3 for the area: the base (keep/frozen/p3_base, Phase 2's tree with the benchmark's profile and planner input) on the six box-128 systems at 24 threads. A seeded run plans the operator's FFTs with FFTW_ESTIMATE (ensure_wimgmeasures plans only without a global seed, andsimple_test_execalways seeds): the 2-iteration solve takes 1.20-1.30 s and its unaccounted time (the solve's seconds less the PCG profile's accounted subtotal times the iterations) is 2.8-3.1 %. With measured plans (fftw_plans=measure, as in production without a seed) it takes 0.284-0.292 s, unaccounted 12.8-13.5 % (5 iterations 11.6-12.6 %): the area is not measured out. Decision 6 is judged with measured plans, the bytes with estimated ones (reproducible). - The identical part (pcg_solve's whole-array updates threaded over a static split; the operator's element-wise passes, the mask, envelope and ridge multiplies and the preconditioner's, threaded over lines; the adapter writing in place): every iterate byte-identical to the base's at one thread and at 24 (control 2, box 32 12, box 128 12 iterates;ident_p3.log);unit_heterogeneitypassed unchanged; stress three times at 24 threads, no iterate differing (stress_p3_ident.log). Decision 6 (protocol frozen in the journal before the runs; six interleaved rounds of base, threaded, base; box 128, 24 threads, measured plans): the six systems' 2-iteration solve seconds, medians, base 1.748 s and 1.750 s (A-A 0.11 %), threaded 1.627 s, 6.9 % faster; 5 iterations 3.740 s and 3.791 s (A-A 1.4 %) against 3.516 s, 6.0 %. Unaccounted 13.2 % of the solve before, 9.0 % after (5 iterations 12.1-12.4 % and 7.5 %;p3_unaccounted_timing.tsv). Below decision 6 (i)'s 10 %, which decision 11 makes the bar of the host arithmetic: a recorded loser, restored. Mechanism: the passes it threads were about 7 % of the solve; the rest of the unaccounted time (0.0245 s of 0.268 s) is mostly the serial double inner products, which only the line partials thread. Patch:keep/patches/p3_identical_threading.patch. - The line-partial inner product (dot_real_volume: single-precision products summed per line of dimension 1 under!$omp simd, the partials added serially in double in line order, parallel over lines): vectorised with 32-byte vectors, no alignment peeling, the serial double sum an in-order fold (vec_reconstructor_pcg.txt). Decision 5 in apcg_reconstage at box 128 on four products of the engine's kinds (x.x with x in (0,1), r.r, r.Dr with D > 0, r.(r+s)): calibration seed 42, largest relative error 3.911e-10; tolerance 7.83e-10 frozen above before the judged seeds; seed 43 6.91e-10, seed 44 1.134e-9 (r.Dr): failed; the bytes the same at teams 1, 4 and 24 throughout (p3_pcg_recon_judged). Diagnosis (dotdiag.f90, the kernel in a standalone program with the build's flags, 40 seeds by 4 products): relative error RMS 4.2e-10, largest 1.10e-9, 6.2 % of the products above 7.83e-10; with double line sums 1e-12. No defect: the error is the float32 summation's, about 900 times below the ceiling (1e-6), and twice one seed's largest error lies inside its seed-to-seed spread (seed 42 drew low; eight judged products had about a two-in-five chance of a miss). The tolerance stays (section 7): not adopted, restored. Kept for a ruling: the stage inkeep/patches/p3_highlevel_pcg_with_stage13.f90, the three changes together inp3_threading_linepartials_d10.patch, the two of decision 11 over the final tree inp3comb.patch. Measured for that ruling only (a scratch tree,keep/src_p3comb, frozenp3comb; six interleaved rounds as above, no foreign load): decision 11 as a whole is 15.8 % faster at 2 iterations (base 1.723 s and 1.733 s, A-A 0.59 %; 1.450 s) and 15.2 % at 5 (A-A 0.26 %), which passes decision 6; only decision 5 holds it back (p3_time_comb_table.txt). - Decision 10 (its condition met in Phase 1; P0 kept):pcg_solver_options%mres_at_exit(default.true.);.false.drops the exit iteration's preconditioner application andMRESis the iteration before's (final_rel_residual_m_iter; after a single iteration none, -1, still marked:d10/final2_its1_refine3D.log). The master's optionalrefinement, passed byassemble_refine3D_pcg(shared-memory and distributed refine3D), sets it for every solve at fixed iterations (rtol <= 0,rtol_atm <= 0, the regularized solve); the final reconstruction (the reconstruction service) calls without it.pcg_reconstage 13 (2 and 5 iterations): the same iterate bytes,MRESof iteration k-1. End to end (d10/, a copy of the 6vxx solve3D project, 72 particles, box 192, one thread,SIMPLE_SEED=42, base against final): refine3Drec_backend=pcg maxits=2gives identical maps and particle records, lines readingMRES(it-1)=, and a 2-iteration solve of 4.60 s against 6.44 s (estimated plans); reconstruct3Drec_backend=pcgon its project gives identical report lines and maps, its diagnostics gaining onlyfinal_rel_resid_m_iter=2. On the benchmark (measured plans) the dropped application is 17.9 % (15.9-19.1) of a 2-iteration solve at box 128, 8.3 % at 5. - Unaccounted time before and after: the final build runs the base's arithmetic on the benchmark (its iterates byte-identical to the base's at 1 and 24 threads,ident_p3_final.log), so after equals before: 13.5 % (12.7-14.5) against the base's 13.1 % and 12.6 % in one interleaved set (p3_time_final; that set's A-A spread is 9.6 %, a desktop browser was active, and no verdict is taken from it). - Defect found (outside the table, not fixed): the base's own box-128 iterates differ between one thread and 24 while the systems (raw accumulators, truth) are byte-identical; box 32 and the control agree. Section 5's thread identity of the PCG solve does not hold at production size; the cause (the operator's threaded FFTs or the kernel's set-up) was not localised. And, for the report: a seeded run plans the PCG operator's FFTs with FFTW_ESTIMATE, 4.2 times slower at box 128 than measured plans. - Exit items: the identical part byte-identical at one thread and the team,unit_heterogeneity, stress (above; then restored by decision 6); decision 5 (failed on seed 44, diagnosed, restored); decision 6 (the threading a loser); decision 10 (adopted;pcg_reconstage 13; end to end); the bgal pair lapsed (R8 (d)); the unaccounted time before and after (above); the one-thread 6vxx identity on the frozen final build, 185 declared outputs the same as the Phase 0 base's (keep/identity/cmp_p0a_p3final; its solve3D reconstructs by gridding, so it exercises none of this phase);unit_reconstruction,unit_heterogeneityandpcg_reconpass; fast gate 15 of 15 (fast_gate_p3b.log, and after the last editfast_gate_p3c.log). - Proposed skill edit (not applied):simple-main-volumesaystest=pcg_reconhas 12 gated stages; it has 13. - What it means, in short: the PCG keeps its arithmetic, and refinement's two-iteration solves skip a preconditioner application that only fed a diagnostic, about a sixth of each solve, with the maps unchanged. The threaded vector passes are exact but short of the 10 % bar alone, and the single-precision inner product, accurate to about 1e-9, failed a tolerance drawn from one low seed; together they would make the solve 16 % faster, and both wait as one patch for a ruling on that tolerance. - 2026-11-29 11:41, Phase 3 under ruling R11, decision 5 re-frozen before anything is judged against it: the PCG line-partial inner product's tolerance is 2.2e-9 relative to the double sum, twice the largest error of the 40-seed diagnosis (1.10e-9,keep/precond/p3/dotdiag.out), which R11 takes as the calibration that should have been made; ceiling 1e-6. Judged on the fresh seeds 45, 46 and 47 by thepcg_reconstage with its four products (box 128); a miss is a stop. Seeds 42 to 44 stand as measured above (3.91e-10, 6.91e-10, 1.134e-9). - 2026-11-29, Phase 3 resumed under ruling R11: decision 11 adopted as a whole by the ruling, over the inner product's tolerance Phase 3 froze; decision 10 stays; DONE. The Dell; one build in the repository's tree, frozen askeep/frozen/p3_r11, every check on it; no foreign load during the timing (byps). Every repository edit of this part went through the editor, not the shell (R11 (a)). Files changed in this part:src/main/opt/simple_pcg_solver.f90andsrc/main/volume/simple_reconstructor_pcg.f90(the hunks ofkeep/patches/p3comb.patch: the threaded whole-array updates and element-wise passes, the operator and preconditioner writing into the engine's vectors, the line-partialdot_real_volume; decision 10 kept),src/main/commanders/test/simple_commanders_test_highlevel_pcg.f90(pcg_reconstage 14, the inner product; decision 10's stays stage 13),doc/policies/3D/reconstruct3D_pcg_policy.md(section 7: the inner product and the threading; section 9: 14 stages),doc/implementation_notes/completed/pcg_decision_log.md(the dated entry; its file-table row gained Phase 3 first), this note (R11 written into decisions 5 and 11; the rows of the test UI, which R11 (a) gave Phase 3, and of the decision log; the Phase 3 entry above marked superseded in part; the re-freeze line above; this entry). Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch; the evidence is inkeep/precond/p3/. - The fence (R11 (a)): Phase 3 had edited the test UI (fftw_plans, an existing key) outside its row and by shell; the driver stopped the run on it. The change is accepted and the row reads "1, 3". - Decision 5, re-frozen by R11 (b) at 2.2e-9 before anything was judged (the line above), judged on the fresh seeds 45, 46 and 47 bypcg_reconstage 14 (box 128, the four products x.x with x in (0,1), r.r, r.Dr with D > 0, r.(r+s)): largest relative error per seed 9.07e-10, 4.33e-10 and 6.00e-10, all twelve between 1.4e-11 and 9.07e-10; passed; the bytes the same at teams 1, 4 and 24 throughout (p3_r11_pcg_recon). Seeds 42 to 44 stand as measured: 3.91e-10 (calibration), 6.91e-10, 1.134e-9 (the miss against 7.83e-10). - Decision 6: the solver equalskeep/src_p3comb's; the reconstructor differs from it only in the report lines' marking condition (changed after that tree was cut), so the build was retimed by the frozen protocol (six interleaved rounds of base, adopted, base; box 128, 24 threads, measured plans;p3_time_r11_table.txt): the six systems' 2-iteration solve seconds, medians, base 1.738 s and 1.728 s (A-A 0.56 %), adopted 1.480 s, 14.9 % faster; 5 iterations 3.747 s and 3.754 s (A-A 0.17 %) against 3.245 s, 13.4 %. Passed (at least 10 % and more than twice the A-A spread). The scratch measurement of the same change before it (15.8 % and 15.2 %) is information only. Unaccounted time (the solve's seconds less the PCG profile's accounted steps): 13.2 % of the 2-iteration solve before, 3.7 % after (5 iterations 12.3 % and 2.6 %;p3_unaccounted_r11.tsv). - Bytes (estimated plans,ident_p3_r11.log): the adopted build's iterates are the same at one thread and at 24 on the control and on box 32 (2 and 12 iterates), as the base's are; on box 128 they differ between the two, as the base's already did (the defect recorded above). Against the base build: the control and all 12 box-128 iterates byte-identical, 5 of the 12 box-32 iterates different, by at most 4.5e-8 relative after 2 iterations and 1.13e-7 after 5, the same at both thread counts (p3_r11_vs_base_compare.tsv): the line partials move each inner product by about 1e-9, which changes the single-precision step lengths only now and then. Stress at 24 threads, three repeats of control, box 32 and box 128: no iterate differing from the build's first 24-thread run (stress_p3_r11.log).unit_reconstructionandunit_heterogeneitypass;pcg_reconpasses all 14 stages and 1b; fast gate 15 of 15 (fast_gate_p3_r11.log). The one-thread 6vxx identity on the frozen build againstp0_base_a(its solve3D reconstructs by gridding): 185 declared outputs the same, none differing (keep/identity/cmp_p0a_p3r11). - Vectorisation: the inner product's!$omp simdloop is the one checked in the first part (32-byte vectors, no alignment peeling,vec_reconstructor_pcg.txt); the code is the same. - For the report (R11 (d)): decision 11 is adopted by ruling R11 over the run's own frozen tolerance, with seeds 42 to 47 above, the 40-seed diagnosis (dotdiag.f90,dotdiag.out) and the two timings. - Proposed skill edit (not applied):simple-main-volumesaystest=pcg_reconhas 12 gated stages; it has 14. - What it means, in short: the PCG's own arithmetic outside the Fourier transforms is now threaded and its inner products vectorised, which makes the production two-iteration solve about 15 % faster at box 128 on 24 threads; the maps move by float32 rounding at most, and the inner product's accuracy against a double sum is checked at everypcg_reconrun. - 2026-11-29 12:09, Phase 4 (a), decision 5 frozen before the judged seeds: the single-precision distance conversion's tolerance is 4.77e-7 absolute against the double conversion of the same inverse FFT row and norm, four times the largest error on the calibration seed 20261129 (1.192e-7:unit_pftc_align2D3D, suite polar shift map kernel,test_dists_single_precision, 9,216 distances of 4 references by 8 particles at three shifts). The error is one float32 unit at distances in [1, 2), the floor, so four times, not twice; below the ceiling 4.8e-7. The judged seeds are 20261130 and 20261131. - 2026-11-29 13:34, Phase 4 (b), decision 5 frozen before the judged seeds: the posterior weights of the draw and of the quadrature (single precision through the array exponential) are held to 1.77e-7 of the row's mass against the double formula on the same rows, four times the largest error on the calibration seed 20261129 (4.42e-8:unit_pftc_align2D3D, 3D probability table,test_draw_single_precision, 2,000 rows of 364 distances at temperatures 10 to 1e4; no draw differed from the double draw at the same variate). The error is a rounding of the exponential's result, below one float32 unit of the mode's weight, the floor, so four times; no ceiling is listed for this quantity. The judged seeds are 20261130 and 20261131. Decision 7 is met before this: the array exponential's largest error over 1e6 arguments on [0, 80) is 0.976 units in the last place (unit_numerics, suite math; bound 2). - 2026-11-29 14:55, Phase 4 (c), decision 5 frozen before the judged seeds: the shift map's single-precision cell scoring is held to 4.8e-7 in the loss's units (the log mass's difference from the double scoring of the same grid, divided by the temperature: a normalised Euclidean loss, so the Euclidean distance's ceiling), the ceiling itself: four times the calibration seed's largest error (2.28e-7 on 20261129:unit_pftc_align2D3D, polar shift map kernel,test_cell_scoring_single_precision, 24 pairs at three temperatures; no mode differed), the floor's rule, would exceed it. The judged seeds are 20261130 and 20261131. - 2026-11-29, Phase 4, the polar tail: all three items kept: (a) the single-precision distance conversion, (b) the array exponential with the posterior weights on it, (c) the shift map's single-precision cell scoring with the maximum found in a second pass; DONE. The Dell; production builds in the repository's tree, frozen per item (keep/frozen/p4a,p4b,p4c; the base isp3_r11, Phase 3's last build); the timings of (a) and (b) on a scratch timer tree (keep/src_p4t,keep/build_p4t: the repository's sources with Phase 0's per-thread wall-clock accumulators around the target loops, re-applied to each variant bykeep/tools/apply_timers_p4.py; frozenp4tA_a,p4tB_a,p4tB_b), never in the diff; (c) on production's own timer of the cell scoring. No foreign load during any timing (byps); the load before and after every run is in itsbench_runs.log. Files changed:src/main/pftc/simple_polarft_corr.f90(a),src/main/pftc/simple_polarft_shiftmap.f90(c, and the helpercells_max),src/main/pftc/simple_polarft_shiftmap_tester.f90(the checks of (a) and (c); the fixture's optional seed),src/utils/math/simple_math.f90(exp_neg_array),src/utils/math/simple_math_tester.f90(new, its tester),src/main/strategies/search/probabilistic/simple_eul_prob_tab_utils.f90(posterior_weights, the draw and the quadrature on it),src/main/strategies/search/probabilistic/simple_eul_prob_tab_tester.f90(the draw's check),src/main/commanders/test/simple_commanders_test_class.f90andsrc/main/ui/simple_test/simple_test_ui_class.f90(the suite math ofunit_numerics),src/main/commanders/test/simple_commanders_test_highlevel_matchbench.f90(the per-pair draws for comparing builds; its row added to the file table in this phase), this note (the row, the three freeze lines above, this entry). Paths below are under/home/elmlundho/agent_runs/f32_pcg/scratch; the journal isstate/journal_phase_4.md, the tools are inkeep/tools/. - Decision 6's protocol for the polar items, frozen in the journal before the first timing: (i) A (before the item) against B (with it) onpolar_matching_bench nspace=2500 nstates=1(Phase 0's case): for (a) and (b) the timer trees onblock_prod(the production tile B=16) andper_pair, for (c) the production builds onsuite=shiftmap; 24 threads unpinned, six interleaved rounds of A, B, A; the target loop's thread-seconds (medians), the A-A spread from the two A sets (keep/tools/time_p4.sh,time_p4.py,time_maps.py); (ii) the same at one thread pinned to CPU 0, three rounds; (iii)simulated_workflow_6vxxat seed offset 0 and one thread, three executions each way side by side on pairs of performance cores (keep/tools/iii_p4.sh): wall time and thesolve3Dfills' thread-seconds.block_prodandper_pairdo not run the shift maps, so (c) is judged onsuite=shiftmapalone. The count of drawn rotations that differ from the base's needs per-pair draws, which no suite wrote:time_onenow writes them under estimated plans (polar_matching_draws_<layout>_t<nthr>.bin), compared bykeep/tools/draws_cmp.pyon the timer trees' runs (the timers change no result); (c)'s modes bysuite=shiftmap fftw_plans=estimate's identity files (keep/tools/maps_cmp.py). - (a)euclid_dists_from_crvecin single precision: the reciprocal of the norm and the bound rounded once from double, one fused multiply-add per rotation, a select for the invalid marker; 32-byte vectors (vec_p4/vec_corr.txt). Decision 5:test_dists_single_precisionin the submodule testersimple_polarft_shiftmap_tester.f90, not the correlation tester the phase notes named: the conversion is private to the calculator, and only a submodule tester can feed it and the double conversion the same inverse FFT row and norm. Tolerance 4.77e-7 frozen above, four times the calibration's 1.192e-7 (one float32 unit at distances in [1, 2)). The calibration and the first judged runs drew one data set: the shared fixture callsparams%new, which reseeds, so the seed set before it never reached the data; found when (c)'s three seeds gave the same largest error to four digits, fixed by an optional seed applied afterparams%new(the other callers unchanged). The frozen tolerances of (a) and (c) stand (calibrated on the fixture as drawn, mislabelled 20261129) and the judged seeds were rerun on their own data: 1.192e-7 on 20261129, 20261130 and 20261131: met. Decision 6: (i) the conversion's thread-seconds at 24 threads,block_prod5.754 and 5.891 s (A-A 2.35 %) against 1.712 s, 70 % less;per_pair6.012 and 5.880 s (2.22 %) against 1.404 s, 77 % less; (ii) pinned 0.1695 / 0.1693 against 0.0481 s (72 % less) and 0.1673 / 0.1691 against 0.0522 s (69 % less); (iii) walls 586.6 / 585.2 / 554.4 s against 586.2 / 588.2 / 557.0 s (medians +0.17 %; per round +0.22 % and +0.47 %), fills 37.25 / 37.01 / 35.62 against 37.10 / 37.07 / 35.49 thread-s: met.suite=fillsat 24 threads onp4a: 48 comparisons, no differing entry. Drawn rotations differing from the base's on the benchmark's 5e6 pairs:per_pair805 (0.016 %),block_prod757 (0.015 %); where the rotation agrees the drawn loss is within 8.3e-8 relative. Kept. - (b) The array exponentialexp_neg_arrayinsimple_math.f90: exp(-x) = 2^-k exp(t), t = k ln2 - x exact (ln2 in two parts), a degree-6 polynomial in t fitted for it, the scale through the exponent bits, selects only, so that the loop vectorises (32-byte vectors,vec_p4/vec_simple_math.txt); exactly 1 at 0 and 0 from 80 on. Decision 7:simple_math_tester.f90, the suite math ofunit_numerics: largest error over 1e6 arguments on [0, 80) 0.976 units in the last place (bound 2): met.draw_posterior_rowandinpl_quadraturetake their weights from one private routine,posterior_weights(the arguments in single precision, the difference clamped at 80/temp before the product so that no temperature overflows, invalid distances at the cut), and the array exponential; their sums, the cumulative sum and the target stay double. The argument loop does not vectorise (GCC sinks the subtraction into a branch it cannot speculate under trapping maths; four forms tried in a scratch copy) and is left scalar. Decision 5 (test_draw_single_precisioninsimple_eul_prob_tab_tester.f90: 2,000 rows of 364 distances per seed at temperatures 10 to 1e4, the draw's weights and the quadrature's posterior against the double formula, relative to the row's mass): calibration 4.42e-8, tolerance 1.77e-7 frozen above, judged 4.53e-8 and 4.50e-8: met; none of the 6,000 draws differed from the double draw at the same variate. The existing draw and quadrature tests pass unchanged (their oracles reproduce the base's double arithmetic within 1e-9 of the cumulative bounds). Decision 6: (i) the draw's thread-seconds at 24 threads,block_prod55.57 and 55.03 s (A-A 0.97 %) against 18.87 s, 66 % less;per_pair55.85 and 56.00 s (0.28 %) against 19.96 s, 64 % less (the benchmarks' walls 24 % and 8.6 % less); (ii) pinned 2.985 / 2.986 against 1.127 s (62 % less) and 3.143 / 3.143 against 1.220 s (61 % less); (iii) walls 585.3 / 588.8 / 557.0 s against 588.8 / 589.2 / 557.4 s (medians +0.6 %; per round +0.33 % and +0.07 %), fills 36.78 / 36.73 / 35.35 against 37.15 / 37.19 / 35.66 thread-s (+1.1 %): within 2 %, met.suite=fillsonp4b: no differing entry. Drawn rotations differing from (a)'s build:per_pair5 of 5e6,block_prod6; the drawn losses otherwise byte-identical.unit_numericsandunit_pftc_align2D3Dpass. Kept. - (c) The cell scoring ofshiftmap_drawin single precision: l = b + a gout per cell, a = -temp scal per rotation and b = log area - prior penalty - temp offs per rotation and magnitude, each rounded once from double; then a second pass: each magnitude's largest log mass (cells_max, a simd max reduction), the first magnitude holding the maximum, the maximum at the physical temperature from the magnitudes' maxima (on each magnitude an increasing affine image of the tempered log mass), and the maximum's first cell searched in that magnitude. All three loops vectorise (16- and 32-byte vectors,vec_p4/vec_shiftmap.txt); the disk draw is untouched. Decision 5 (test_cell_scoring_single_precision: 24 pairs at the particle's temperature times 0.1, 1 and 10, the log masses against the double scoring of the same grid, divided by the temperature): tolerance 4.8e-7 frozen above (the ceiling: four times the calibration's 2.28e-7 would exceed it); on their own data 2.39e-7 (20261129), 2.29e-7 and 2.32e-7 (judged): met; no mode of 216 differed. Decision 6 on production's timer of the cell scoring (us_select): (i) 24 threads, window map 18.946 and 18.945 us (A-A 0.01 %) against 9.306 us, 51 % less; screen map 144.38 and 144.03 us (0.24 %) against 53.87 us, 63 % less; (ii) pinned 19.10 / 19.07 against 7.28 us (62 % less) and 130.49 / 130.46 against 38.20 us (71 % less); (iii) walls 585.4 / 593.2 / 557.6 s against 586.2 / 587.7 / 556.0 s (medians +0.14 %; per round -0.4 % and -0.3 %), fills 37.38 / 37.24 / 35.57 against 35.67 / 35.73 / 34.23 thread-s (4.2 % less; the map cell selection 2.45 to 0.93 thread-s): met.suite=fillsonp4c: no differing entry. The maps against (b)'s build under estimated plans: no mode of the 1,024 window and 1,024 screen maps differs, the losses are byte-identical, the physical widths differ by at most 1.2e-4 relative (the re-rounded log masses and the per-magnitude maximum at the physical temperature); the estimated-plan identity files ofsuite=shiftmapare re-baselined by this change. Kept. - Exit items: decisions 5 to 7 per item (above);suite=fillszero differing entries after each item;unit_pftc_align2D3Dandunit_numericspass on the final build; fast gate 15 of 15 (logs/fast_gate_p4c.log, the registry check included). - Decisions taken under delegation: (a)'s check in the submodule tester (above); the matchbench entry's row and its draw dump; the timer trees as the target loops' measure for (a) and (b); the seeding defect of my own tests found and fixed before the verdicts were written, the frozen tolerances kept; (iii) run as side-by-side executions on the performance cores (both builds in each round). One recorded slip: a one-second prototype ran on a performance core during (a)'s round 2 or 3 of the 24-thread timing (one run possibly perturbed; the verdict is on medians of six rounds and its margin is 70 % against a bar of 10 %). - Proposed skill lines (not applied):simple-main-pftc: the distance conversion and the shift map's cell scoring are single precision with the decisions in double; their checks are the submodule tester'stest_dists_single_precisionandtest_cell_scoring_single_precision; the shift-map fixture takes its seed afterparams%new.simple-main-strategies-probabilistic: the posterior weights of the draw and the quadrature come fromposterior_weightsthroughexp_neg_array(single precision, exactly 0 from exp(-80) on); sums and targets double.simple-modern-fortran: for a loop that must vectorise under gfortran without fast maths, avoidmin/max(NaN branches),nint(round half away from zero) and arithmetic insidemerge's arms (sunk into branches that trapping maths cannot speculate): compute unconditionally, then select; a fixture built byparams%newis reseeded by it, so seed after it. - What it means, in short: the three last-bit pieces of the probability tables' tail are now single precision and vectorised: the distance conversion takes under a third of its time, the posterior draw about a third, the shift map's cell scoring a third to a half; together they make the dense block kernel's benchmark about a quarter faster at 24 threads, change no shift-map mode and a sixtieth of a percent of the drawn rotations, and leave the simulated workflow's time and results within its spread. - 2026-11-29 16:18, Phase 5 (item 1, the single-precision shift-search kernels), decision 5 frozen before the judged seeds: against the double residual fed the same inputs (gen_shift_curv_for_rot_8_aln, L and its gradient), the search's cost -exp(-L) is held to 3.71e-7 relative and its gradient to 5.93e-7 of the pair's largest gradient component (over the shift grid): on the calibration seed 20261129 the largest errors are 9.27e-8 (cost, over the gradient kernel's value and both cost kernels; at float32's floor, below two epsilons, so four times) and 2.96e-7 (gradient; above the floor, so twice), both below the ceiling 1e-6 (unit_pftc_align2D3D, polar correlation,test_shift_search_single_precision: box 128, pftsz 160, shells 2 to 32, production astigmatic |CTF|, 2 references by 4 particles (two matched at SNR about 0.1 and 1, two unrelated), 81 shifts over +-4.5 px at 8 rotations of both ring branches). The judged seeds are 20261130 and 20261131. - 2026-11-29, Phase 5, the Euclidean shift-search kernels: nothing kept. Item 1, the single-precision shift-search kernels, is a recorded loser (section 6's evaluation count and an existing assertion ofunit_pftc_align2D3Dfail) and is restored; item 2, the single-precision shift matrix, is not attempted (its only consumer is item 1); the shift search's benchmark route is kept; DONE. The Dell; the base iskeep/frozen/p5_bench0(Phase 4's final kernels and the benchmark route), item 1's buildp5_i1, the restored final buildp5_final; the counts and the timings on scratch timer trees (keep/frozen/p5tA,p5tB: the base and item 1 with per-thread accumulators around the gradient kernel, the cost kernels and the shift matrices, L-BFGS-B's counters and each search's line-search failures; made bykeep/tools/make_p5_trees.shandapply_timers_p5.py); item 1 as a patch,keep/patches/p5_item1_sp_shift_kernels.patch; the journal isstate/journal_phase_5.md. - Item 1.gen_euclid_grad_for_rot_8and the two Euclidean_8cost kernels took the reference index and ran on one routine: per shell the ring's two segments as float32simdpartials of |D|^2 and of the two gradient sums, from the single-precision references, particle and |CTF|, the shift matrix rounded from the double recurrence andargtransfrounded, weighted bysigma2_wk8and added in double; the doublegen_euclid_residual_gradstayed for the raw-loss and curvature kernels. The vectoriser: every segment loop 32-byte vectors. - Decision 5 (frozen above): the judged seeds 20261130 and 20261131 give cost errors 1.01e-7 and 8.4e-8 (tolerance 3.71e-7) and gradient errors 2.20e-7 and 3.08e-7 (tolerance 5.93e-7): met. The kernels that must keep their bytes, compared on the timer trees through a scratch dump: the cc kernels (gen_corr_for_rot_8both forms,_aln,gen_corr_grad_for_rot_8_aln,gen_corr_grad_at_angle) and the curvature, raw and joint kernels (gen_shift_curv_for_rot_8_alnwith its curvature,gen_raw_euclid_grad_for_rot_8,gen_raw_euclid_grad_at_angle,gen_joint_curv_at_angle), cc and euclid: byte-identical. - Section 6's counts, on the benchmark's pairs (polar_matching_bench suite=shsrch, below; 8,000 searches per seed, seed offsets 0, 1, 2; the reading frozen in the journal before the runs): the base takes 11.79 / 11.86 / 11.87 cost-and-gradient evaluations per search (spread 0.72 %) with 264 / 274 / 261 searches ending in a line-search failure (spread 13); item 1 takes 12.83 / 12.88 / 12.93, +8.8 / +8.6 / +8.9 % against the bound of 5 %: not met; searches failing in item 1 and not in the base 8 / 7 / 11, within the base's spread of 13: met; failures overall fall to 11 / 9 / 11. The rise is in the ordinary searches (10.6 to 11.8 evaluations); the base's failing searches (about 47 evaluations each) end on fewer and better in item 1 (score +6.9e-4 on average). Over 24,000 L-BFGS-B runs the base ends 23,184 on the projected gradient, 9 on the relative reduction, 15 at the evaluation limit and 792 in a line-search failure; item 1 23,565, 312, 90 and 33. - The assertion:unit_pftc_align2D3D, continuous in-plane,test_grid_ptcl_searchcase 3 ("and is not worse than the reference-frame grid") fails on item 1 (particle-frame grid ends at 3.717, 2.556 with score 0.99590 against 3.661, 2.822 and 0.99964). Diagnosis (every evaluation traced on scratch copies of both trees): the discrete-angle callback of the alternating search changes the rotation at an accepted iterate, so the next line search starts from the old objective's cost and gradient and its trials see the new objective; it backtracks toward step zero. The base's double cost resolves steps of 1e-10 px, the line search ends after 19 backtracks (the limit is 20) and the next iteration runs on the fresh gradient; item 1's cost is constant below the float32 rounding of the shift matrix, the line search reaches the limit, L-BFGS-B restores the stale gradient, restarts uphill and ends inABNORMAL_TERMINATION_IN_LNSRCHwhere the rotation changed. The same resolution limit is why the ordinary searches take more evaluations: the search's strict line search (ftol=gtol= 1e-5) andfactr1e7 (2.2e-9) assume a double cost and gradient, and float32 terms resolve about 3e-7 of the gradient's scale. The line search, its constants and the search object are outside this plan (section 4 and the file table), so item 1 cannot be made to pass here. - Decision 6, measured for the record before the restore (timer trees, load 0.7 before the runs): (i) team 24, six rounds, the gradient kernel with its shift matrix 8.220 / 8.268 (A1 / A2) against 6.175 thread-s, 24.9 % less with A-A 0.57 % despite 8.8 % more evaluations (29.1 against 20.1 us per evaluation, 31 % less); the whole search loop's wall 0.2176 against 0.1949 s (10.4 % less); (ii) one pinned thread, three rounds, 0.4329 / 0.4325 against 0.3555 thread-s (17.9 % less). Both met; (iii) not run (nothing to keep). Speed is not what stops item 1. - Kept: the benchmark route of section 6 for this phase,polar_matching_bench suite=shsrch(bench classPMB_SHSRCH: the dense 3D harness's calculator, 4 references per particle, the production alternating L-BFGS-B search from each pair's best rotation; per-search records of cost, shift, rotation, evaluations and alternations inpolar_matching_shsrch_t<nthr>.bin), listed in the test UI'ssuite=help (file-table row added before the edit). Onp5_finalits records equalp5_bench0's at teams 24, 12 and 1, and team 24 equals team 12. - Exit items: decision 5 met; section 6's counts not met (item 1 restored); decision 6 met on (i) and (ii);unit_pftc_align2D3Dpasses on the final build (6,933 of 6,933); fast gate 15 of 15 (logs/fast_gate_p5.log);suite=fillsonp5_final: 48 comparisons, no differing entry. - Decisions taken under delegation: the benchmark route and its per-search records; the counts read per seed on the same pairs, the new failures held to the base's three-seed spread of failures; decision 5's fixture with the production astigmatic CTF (the CTF setter is a submodule test hook); the target loop of decision 6 taken as the gradient kernel with its shift matrix; (iii) not run for a loser; item 2 dropped with item 1. - For the maintainer (not done, outside the plan): float32 terms in the shift search need either the shift-dependent sums kept in double (for example the cross-term form F = A + B - 2 Re sum(q sh), with q = conj(Rot(REF).CTF) PTCL rounded once per pair and rotation and the double shift matrix, smooth in the shift), or a search that evaluates again when the discrete-angle callback changes the rotation and line-search constants for float32 gradients. The base itself passestest_grid_ptcl_searchcase 3 by one backtrack. - Proposed skill lines (not applied):simple-main-pftc: the shift search's L-BFGS-B (strict line search,factr1e7) and the discrete-angle callback's change of the objective mid-run need the Euclidean shift kernels' cost and gradient in double: float32 terms were measured to add 9 % evaluations per search and to failtest_grid_ptcl_searchcase 3.simple-main-opt: anopt_callbackthat changes the objective leaves L-BFGS-B with the old cost and gradient for its next line search; the recovery needs a cost resolved at tiny steps. - What it means, in short: rewriting the shift search's Euclidean kernel in float32 makes each evaluation about a third cheaper and is accurate to a few parts in ten million, but the search's optimiser is tuned for double precision: it then needs 9 % more evaluations and in one tested case stops early at a worse shift. The kernel stays double; a benchmark of the shift search is added for the next attempt. - 2026-11-29, Phase 6, the workflow gate of the polar changes: passed. The 6vxx after-profile lies inside the before-profile's spread on every gate row with the same failure rate, and decision 6 (iii) is met; Phase 4's three items stay; no source edit; DONE. The Dell. The build judged iskeep/frozen/p5_final, the working tree at Phase 5's end: everything Phases 4 and 5 kept (Phase 4's single-precision distance conversion, the array exponential under the posterior weights and the shift map's single-precision cell scoring; Phase 5 kept only its benchmark route, a test entry), beside Phase 3's PCG changes, which leave the gridding workflow byte-identical at one thread. The base is Phase 0's build of the unchanged code (keep/build_base), the build of the before-profile. Files changed: this entry only. The judging rules were written in the journal (state/journal_phase_6.md) before anything ran. - The after-profile, run as the before-profile was (keep/tools/profile_6vxx.sh:test=profile target=simulated_workflow_6vxx nseeds=20 nthr=1 ncunits=24 keep_outputs=no, twelve executions at a time, 1,696 s, nothing else running;keep/profiles/p6_after,p6_after.out,p6_after.load.log). It is judged row by row: a gate row (every row with a floor; the report-only rows are not gated) is inside when its median moves by no more than the before-profile's robust spread (1.4826 times the median absolute deviation), and the failure rate must not rise (keep/tools/profile_cmp_p6.py; the profile tool's own comparison,test=profile dir1= dir2=, inscratch/p6/cmp/). Result: 15 of 20 executions pass, failure rate 0.25 as before, and the same five seed offsets fail as in the base (3 at a truth correlation of 0.792 against the floor 0.80, base 0.797; 4, 11, 16 and 19 with wrong maps). Every gate row is inside: the map's correlation with the truth 0.8957 against 0.8957 (spread 0.021), the resolution at which its Fourier shell correlation with the truth falls to 0.143 4.30 against 4.23 Angstrom (spread 0.21, the largest move at 0.34 of a spread), the pose error of particle pairs 0.940 against 0.925 degrees (0.26 of a spread), the fraction of pairs within 5 degrees 0.977 against 0.969, 88.5 extracted particles and four 2D classes as before, every check row passing as before. Sixteen of the twenty offsets give the base's truth correlation to seven digits; offsets 2, 3, 7 and 16 moved (by 2.4e-4, -5.2e-3, 7e-5 and +0.017; offset 16 is a wrong map in both). The failed executions' volumes and stacks were deleted, their logs and metrics kept. - Decision 6 (iii) (ruling R8 (c)):simulated_workflow_6vxxat seed offset 0 and one thread, the base against the judged build, three executions each way side by side on pairs of performance cores, two rounds (keep/tools/iii_p6.sh;scratch/p6/iii/iii.tsv, the runs' logs and the load). Wall time 587.8 / 588.6 / 556.0 s against 587.8 / 588.8 / 556.0 s: medians equal (the base's own spread 0.14 %), so met. The fills of the probability tables insolve3D, in thread-seconds, base against judged build, execution by execution: total 36.88 / 36.60 / 35.60 against 35.39 / 35.69 / 33.93 (median 3.3 % less; base spread 0.76 %); their score loop 11.75 / 11.61 / 11.48 against 11.83 / 11.90 / 11.42 (median 1.9 % more, base spread 1.2 %; not gated); the shift refinement 25.18 / 25.00 / 24.15 against 23.66 / 23.79 / 22.57 (5.4 % less), which holds the shift map's cell selection, 2.452 / 2.453 / 2.364 against 0.931 / 0.929 / 0.898 (62 % less); the whole matcher 75.36 / 75.15 / 72.73 against 74.15 / 74.24 / 71.23 (1.3 % less);solve2D's fills 0.33 / 0.33 / 0.31 against 0.31 / 0.31 / 0.31. The load was the runs' own (four, then two); nothing else ran. - Exit items: inside the before-profile's spread with no gate row failing beyond the base's: met; decision 8 (the bgal pair): lapsed by ruling R8 (d); decision 6 (iii): met. No item had to be traced or restored. - What it means, in short: with Phase 4's single-precision pieces in, the simulated end-to-end workflow (movies to a 3D map) gives the same quality over twenty seeds, fails on the same five seeds as before, and gives the same map as before on sixteen of them; at one thread it takes the same time, its probability-table fills take about 3 % fewer thread-seconds and the shift map's cell selection about 60 % fewer. - 2026-11-29, about 18:01, Phase 7 (the continuous kernel), decisions 4 and 5 frozen before the judged seeds. The float32 Euclidean pose kernel (pose_normal_terms_sp: the slot's pixel table, the array gather, one vectorised pass of the 23 sums) against the double kernel on the same slots (pose_normal_terms_dp), on the calibration seed 20261129 (unit_cart_align3D, cart calculator,test_euclid_kernel_single_precision: box 96, bands from shell 2 and from DC to 46, about 3,300 half-plane pixels; CTF-weighted Gaussian-blob particles at noise 0.5 and 4 times the signal's rms; three poses at, near and away from the truth). Largest errors per block length B of the float32 partials:
| B | objective (relative) | gradient (of its largest component) | Gauss-Newton (of sqrt(H_aa H_bb)) | shell residual (relative, per shell) |
|---|---|---|---|---|
| 64 | 3.54e-8 | 4.53e-7 | 5.33e-8 | 2.20e-6 |
| 256 | 2.46e-8 | 6.43e-7 | 1.73e-7 | 2.20e-6 |
| 1,024 | 6.76e-8 | 6.51e-7 | 3.02e-7 | 2.20e-6 |
| the whole band | 1.34e-7 | 7.07e-7 | 5.21e-7 | 2.20e-6 |
Decision 4: the largest B whose errors are, measure by measure, within 1.5 times the best is B = 64 (the
Gauss-Newton matrix admits no other). Decision 5 at B = 64: objective 1.42e-7 (four times 3.54e-8, at float32's
floor), gradient 9.05e-7 (twice 4.53e-7; ceiling 1e-6), Gauss-Newton matrix 2.13e-7 of its diagonal (four
times 5.33e-8; ceiling 4e-6), shell residual 4.39e-6 per shell (twice 2.20e-6; no ceiling listed: the error is
the float32 cancellation of |M - X|^2 on the low, high-SNR shells, the same for every B, and the shell residual only
feeds the sigma2 estimate). The judged seeds are 20261130 and 20261131.
- 2026-11-29, Phase 7, the continuous kernel: kept. Under objfun=euclid the continuous pose kernel now works on
the slot's pixel table, gathers the reference through the array form of the B-spline gather and sums its 23 terms in
float32 blocks of 64 pixels added in double; decisions 4 to 6 and every exit item met; the cc route keeps its bytes
and costs about 6 % more time; DONE. The Dell. The build judged is keep/frozen/p7_k2; the base is
keep/frozen/p5_final, whose continuous kernel and gather are the unchanged code (no earlier phase touched them);
the journal is state/journal_phase_7.md.
- What changed. simple_cartft_calc.f90: a prepared Euclidean particle slot carries a pixel table, its band's
half-plane pixels without DC in the kernel's order with their shell, frequency factors, observation and transfer
(built in fill_ptcl, released with the slot); pose_normal_terms dispatches on the slot's objective: cc to
pose_normal_terms_dp, the double kernel as it was (also the tester's reference), Euclid to
pose_normal_terms_sp, which takes the table in passes of 64 pixels: the locations in double rounded once, the
array gather, one vectorised pass of the 23 sums (euclid_pose_pass: 32-byte vectors in the vectoriser's report),
the partials added in double per block of CART_EUCLID_BLOCK = 64 pixels; the DC pixel, the Friedel factor, the
symmetry and the finaliser in double as before; the shell residual from the same pass. simple_cartesian_fourier.f90:
the B-spline gather has one body, private and called only from the array form's loop
(gather_packed_bspline3_window_grad_n, n locations per call), so the compiler inlines it there; the point form
gather_packed_bspline3_window_grad is gone (its one production caller, the calculator's private gather, now
calls the array form at n = 1, one external call per pixel as before). doc/policies/KB_Interpolation_Policy.md
names the array form (file-table row added in this phase). Testers: test_euclid_kernel_single_precision
(decisions 4 and 5) and test_array_bspline3_gather, with a one-point helper for the existing B-spline tests.
- The first implementation (keep/frozen/p7_k1) looped over the public point gather: under -fPIC a public module
procedure may be interposed, so GCC kept one call through the procedure linkage table per pixel and the array form
removed nothing from the gather (the object code shows the call). Its decision 6 timing was stopped after one round
(local Euclid -10.2 %, capture -16.1 %) and the gather restructured as above; the gather's results are bit for bit
the same in both builds and the base (the decision-5 numbers and the B-spline oracle's line are identical).
- Decision 5 on the judged seeds at B = 64: 20261130 objective 1.78e-8, gradient 1.50e-7, Gauss-Newton 9.26e-8, shell
residual 8.01e-7; 20261131 2.25e-8, 4.19e-7, 5.78e-8, 1.20e-6 (tolerances 1.42e-7, 9.05e-7, 2.13e-7, 4.39e-6): met
on three seeds. The production entry equals the float32 kernel at its block, and for a cc slot the double kernel,
bit for bit. The array gather equals the gather one point at a time, value for value, on 48 points (Friedel taps,
periodic edges, both sides of stencil switches), and reports a location off the wrap table.
- The cc route's byte identity: cont_refine3D_bench seed 0 against Phase 0's run (keep/bench/p0_cont_base_s0a;
keep/tools/cc_ident_p7.sh): the cc rows of metrics.tsv and the 10,000 particles' 3D orientations of the
reference, local_cc and capture_cc identical.
- Tests (on p7_k2, scratch/p7/func_k2): unit_cart_align3D 1,505 of 1,505; lib_cart_align3D passes (52 checks);
cont_refine3D_1jxy passes its floors as they are (median rotation errors 0.959 and 0.229 degrees in stages a and
b as at Phase 0, shifts equal to six digits, stage e 0.314 against 0.313 degrees); fast gate 15 of 15
(logs/fast_gate_p7.log).
- Section 6's continuous items, cont_refine3D_bench seeds 0, 1, 2 at 24 threads: every solve committed in every
case; passes per solve local Euclid 4.7199 / 4.7221 / 4.7184 and capture Euclid 6.9624 / 6.9585 / 6.9462, the
base's values except capture at seed 2 (6.9461), within the base's three-seed range (0.0037 and 0.0163); seed 0's
Euclidean median errors identical to the base's to seven digits.
- Decision 6 (frozen in the journal before the runs; keep/tools/time_p7.sh, time_p7.py; the benchmark's thread-ns
per pixel-evaluation, the search's thread-seconds over its pixel-evaluations, of which the kernel is 97-99 %).
(i) Team of 24, objfun=euclid, 10,000 particles, six interleaved rounds (scratch/p7/time_k2; the load is the
runs' own): local Euclid 76.47 / 76.41 (base A1 / A2, spread 0.07 %) against 62.72, 18.0 % less; capture
Euclid 54.50 / 54.54 (0.08 %) against 41.15, 24.5 % less: met. (ii) One thread pinned to CPU 0, 500 particles,
three rounds (scratch/p7/time_k2_pin): local 48.43 / 48.44 against 37.30 (23.0 % less), capture 39.91 / 39.76
against 28.35 (29.0 % less): met. Every run did the same work (passes per solve, pixel-evaluations). (iii) The
benchmark runs' wall time, read two ways, both recorded: the whole invocations (the reading frozen in the
journal) base 174.3 / 180.3 s (A1 / A2, 3.4 % apart; pooled 174.9) against 181.3 s, 3.6 % above the pooled base,
0.2 points outside the base's spread; the BENCH records place all of it outside the refinement (the particle
simulation and the reference reconstruction, code the change does not run, base 144.8 / 151.6 s, 4.6 % apart,
against 152.3 s), while the two Euclidean refinement runs themselves, the production entry inside the benchmark
that ruling R8 (c) names, take 28.80 / 28.98 s (pooled 28.88) against 28.63 s, 0.9 % less. Judged met on the
refinement runs; at one pinned thread the whole invocations are 89.7 / 89.8 against 89.5 s.
- Reported, not gated: the cc route's time. Its kernel is untouched, but its per-pixel gather now runs the array form
at one point: interleaved cc runs (scratch/p7/cc_check, local, 2,000 particles, 24 threads) base 76.2 / 78.1,
p7_k1 76.9 / 77.8, p7_k2 81.7 / 81.5 ns per pixel-evaluation, and at 10,000 particles (seeds 0-2) local cc
83.3 / 82.7 / 87.2 against 75.8 / 76.0 / 78.8 and capture cc 57.5 / 58.7 / 58.4 against 54.0 / 53.3 / 55.1: about
6-9 % more. The gather alone costs the same in both forms at one thread (75.0 against 75.1 ns per gather, warm;
scratch/p7/gbench) and 1-4 % more at 24 threads. Kept, because objfun=euclid is the default and gains about 14
ns per pixel-evaluation where cc loses about 5; avoiding the cost would take a second copy of the gather's body
(the no-copy rule) or a chunked cc kernel (the plan keeps the double kernel as it is).
- Decisions taken under delegation: the pixel table also holds the observation and transfer in table order; the
gather's signature (separate one-dimensional arrays, an explicit count) and the removal of the point form; passes
of at most 256 pixels inside a block (64 in production); the shell residual's tolerance taken by decision 5's rule
with no ceiling (none listed); the timing of p7_k1 stopped and the gather restructured before any verdict; the
reading of (iii); the cc trade above.
- Proposed skill lines (not applied): simple-main-cftc: pose_normal_terms dispatches on the slot's objective:
Euclid runs pose_normal_terms_sp (the slot's pixel table built in fill_ptcl, the array gather in passes of 64
pixels, float32 partials per block of CART_EUCLID_BLOCK added in double), cc runs pose_normal_terms_dp, the
double kernel and the float32 kernel's reference in test_euclid_kernel_single_precision. simple-main-interp:
the B-spline gather is the array form gather_packed_bspline3_window_grad_n (n = 1 for one point), its body private
so that it inlines into the loop. simple-modern-fortran: under -fPIC a public module procedure is not inlined
into a loop in its own module (it may be interposed): keep a hot body private and called once; a loop over complex
arrays vectorises when it sits in a routine with explicit-shape dummies, not inline over local arrays.
- Added in Phase 8 by ruling R12 (a), from runs already made, nothing rerun: the cc kernel's share beside the
Euclidean one. Phase 0's timer run (keep/bench/p0_cont_table.tsv, cont_refine3D_bench seed 0, 24 threads):
pose_normal_terms takes 44.7 of the local Euclid case's 377.8 thread-seconds (11.8 %), 6.44 of capture Euclid's
314.6 (2.0 %), 45.8 of local cc's 350.4 (13.1 %) and 6.65 of capture cc's 295.0 (2.3 %). Phase 7's runs on
p7_k2 (seeds 0-2, scratch/p7/func_k2) have no kernel timer; the search's thread-seconds, of which the kernel
was 97-99 % at Phase 0, against the case's: local Euclid 9.9-10.1 %, capture Euclid 1.5-1.7 %, local cc
13.2-13.7 %, capture cc 2.3-2.5 %. So the cc kernel is now the larger of the two in both regimes. Could the pixel
table and the array gather serve a cc kernel unchanged? The gather, yes: it returns the value and the three
derivatives a cc pass needs. The table holds every per-pixel input the cc kernel reads (h, k, the frequency
factors, the observation, the transfer; the shell only the Euclidean shell residual uses), but it is built only
for Euclidean slots (fill_ptcl builds it when the slot has a half): a cc pass would need it built for cc slots
too, from their unwhitened observation and transfer, and no new field. The arithmetic pass is not reusable: a cc
pass sums other quantities (the prediction's power, the cross term, the gradient against the observation and the
model gradient, besides the Gauss-Newton terms). The residual form of ruling R12 (b) would need what the table
cannot hold, the reference projection's norm at the current pose before the pixel pass: a first pass over the
gathered values (the gather is the kernel's dominant cost, so the gathered arrays of the whole band would be kept
rather than gathered twice) or a norm carried from the previous evaluation.
- What it means, in short: continuous pose refinement under the default Euclidean objective now spends 18-24 %
fewer thread-seconds per pixel at 24 threads and 23-29 % fewer at one thread, with the same solves, the same pose
errors and errors of a few parts in ten million against the double kernel; the correlation objective gives the
same results bit for bit and is about 6 % slower, the price of having one gather.
- 2026-11-29, Phase 8, docs and report: DONE. The Dell; no source file changed; the journal is
state/journal_phase_8.md. Ruling R12 (2026-11-29, during Phase 7) is applied here for the first time: written into
decision 2, its part (a) added to Phase 7's entry above (the cc kernel's share beside the Euclidean one, and what the
pixel table and the array gather would need to serve a cc kernel), its part (b) in the report's follow-ups. Files
changed: doc/policies/3D/reconstruct3D_pcg_policy.md (section 5: the preconditioner compared and kept, how a
later comparison is judged, the benchmark's suites; the inner product and MRES were written in Phases 2 and 3),
doc/policies/3D/refine3D_policy.md (the tables' tail's precision at the end of the block-kernel section; the
continuous kernel's precision under objfun=euclid and the cc kernel staying double; why the shift search's
Euclidean kernels stay double), doc/implementation_notes/completed/pcg_decision_log.md (the dated entry with the
arms' table, the control and the six variants, and what the PCG kept and restored with the mechanisms),
doc/implementation_notes/README.md (this note's row, with the report), this note (the status line, decision 2,
the R12 bullet of Phase 7, this entry), and float32_kernels_and_pcg_precond_report.md (new, beside this note, in
the how-to's section 8 order). cont_lm_acceleration.md already carries the pointer the header names (added at the
base), still true; not edited.
- For the report's Apple-silicon table, the plain benchmarks a Mac can run were measured on the Dell, since the
polar verdicts used timer trees (keep/tools/time_p4.sh on keep/frozen/p3_r11 against p7_k2, two interleaved
rounds, 24 threads; keep/evidence/p8_polar_mac; the load the runs' own): polar_matching_bench suite=block_prod
best wall 1.916 / 1.994 s against 1.520 s (about 21 % less in each round), suite=per_pair 4.721 / 4.723 s against
4.829 s (inside the runs' scatter of 4.42-5.02 s: the tail is about 12 % of that benchmark), suite=shiftmap cell
selection 18.94 / 18.99 against 9.75 us per window map and 142.9 / 143.5 against 55.3 us per screen map. The PCG
rows' "before" is the final tree with keep/patches/p3comb.patch reversed, checked to apply by a dry run on a
copy (the base has no PCG benchmark).
- The vectoriser's reports of every rewritten loop are gathered in keep/vec/, the final array gather's
regenerated; the text evidence of Phases 5-8 is copied to keep/evidence/.
- An independent review (a read-only agent given the plan, the report, the how-to and the doc diffs) checked about
40 numbers of the report against this Progress section without a mismatch. Its findings were fixed before the
end: the Mac table's "before" build for the PCG rows, the first PCG tolerance and its seeds, the vectoriser rows of
the gather and the threaded passes, missing delegated decisions with their reasons, a skill line in the wrong
skill, and wording that overstated three findings.
- Exit items: the files of the table changed and nothing else (git status in the report); the report written; the
fast gate on the final tree (below); no job of the run left running.