Wave 4 Four-Way Benchmark & star/test Report (MESA r26.4.1)¶
Known Wave 4 Parity & Work-Scope Discrepancies (#146)
- Raw MESA
r26.4.1timings below were captured cleanly post-51e1adc(need_to_setvars = .true.,fortran_wave4.txt), but all five workloads disagree in checksum between MESA andFlexMESA. star_remeshexhibits a three-way mismatch across Fortran, Rust, and Python/JAX;star_newton_stepStage 0 PyO3 times only the linear solve;star_evolve_stepcomparesdt = 100 sin MESAdo_struct_burn_mixagainst Rustbase.dt, and MESA's 8-zone pre-flight run logshydro_solver_step returned ierr -1.
Wave 4 evaluates the 1D stellar structure engine across five workloads (N_zones in {128, 512, 1024}) and the star/test (\(4.0\,M_\odot, Z = 0.02\)) trajectory.

1. star/test Trajectory Comparison (4.0 Msun, Z = 0.02 ZAMS to 1.00e5 yr)¶
1.1 Historical Audit Finding on Pre-Audit Local Reference (0b2e6bb)¶
Evolving StarModel.from_zams(4.0, 0.02) to max_age = 1.00e5 yr (11 steps, do_remesh=False, op_split_burn=False) in pre-audit docs quoted an uncommitted 0b2e6bb run (log_L = 2.374600 vs. 2.374853 in MESA 26.4.1, leaving pre-audit FlexMESA 2.373933 9.20e-4 dex away) with 1e-3 dex bounds wider than MESA's 11-step signal (3.89e-4 dex on log_L, 1.59e-4 dex on log_R, 1.79e-5 dex on log_Teff):
| Observable | Pre-Audit Uncommitted Ref. | FlexMESA (0b2e6bb) |
Pre-Audit Quoted Dev. | Pre-Audit Bound |
|---|---|---|---|---|
log_center_T |
7.412400 |
7.412298 |
1.02e-04 dex |
<= 1.0e-03 dex |
log_center_Rho |
1.436800 |
1.436338 |
4.62e-04 dex |
<= 1.0e-03 dex |
log_L |
2.374600 |
2.373933 |
6.67e-04 dex |
<= 1.0e-03 dex |
log_R |
0.370300 |
0.370340 |
4.00e-05 dex |
<= 1.0e-03 dex |
log_Teff |
4.169800 |
4.169640 |
1.60e-04 dex |
<= 1.0e-03 dex |
center_h1 |
0.696725 |
0.696732 |
7.00e-06 |
<= 5.0e-05 |
1.2 Committed MESA 26.4.1 star/test Reference & Measured Divergence¶
Under #141 and #143, the real MESA 26.4.1 star/test/LOGS/history.data fixture (tests/fixtures/golden/star_test/history.data) is committed in git (model_number 1 at 3125 yr -> model_number 11 at 1.00e5 yr):
- Committed MESA
26.4.1Step-11 values:log_L = 2.374853,log_Teff = 4.169854,log_R = 0.370371,log_cntr_T = 7.412483,log_cntr_Rho = 1.437448,center_h1 = 0.6967304. - Regression status (
tests/test_wave4_bench.py): MESA26.4.1remeshes2464 -> 992zones at step 2;FlexMESAruns withdo_remesh=Falsecurrently diverge by1.11e-3dex (> 1.0e-3) onlog_cntr_Rhoat step 11 (xfail(strict=True)tracked under#153).
1.3 MESA r26.4.1 vs. FlexMESA Standalone Checksum Discrepancies¶
Provenance summary (benchmarks/raw/26.4.1/): every 1024-zone checksum mismatch is measured directly below (star_micro_vars 6.04e-05, star_hydro_eqns 1.60e-05, star_newton_step 9.15%, star_evolve_step 7.48e-06 with unequal dt, and star_remesh 3-way mismatch across Fortran 5.73660892e+05, Rust 4.25843355e+02, and Python 4.21132239e+02).
| Workload | \(N_{\mathrm{zones}}\) | Comparator Checksum | Safe Rust Checksum | Python/JAX Checksum | |Rust - F90| Rel. |
|JAX - F90| Rel. |
Rust max_rel_err |
JAX max_rel_err |
|---|---|---|---|---|---|---|---|---|
star_micro_vars |
128 | 4.18189385e+03 |
4.18240352e+03 |
4.18240352e+03 |
1.219e-04 |
1.219e-04 |
0.000e+00 |
1.841e-16 |
star_hydro_eqns |
128 | 7.64111853e+06 |
7.63968106e+06 |
7.63968106e+06 |
1.881e-04 |
1.881e-04 |
0.000e+00 |
7.295e-14 |
star_newton_step |
128 | 8.87742063e+04 |
1.11807543e+06 |
1.11807548e+06 |
1.159e+01 |
1.159e+01 |
1.198e-12 |
1.208e-12 |
star_remesh |
128 | 7.13415890e+04 |
4.26154532e+02 |
4.21492690e+02 |
9.940e-01 |
9.941e-01 |
0.000e+00 |
0.000e+00 |
star_evolve_step |
128 | 1.80069293e+03 |
1.80055682e+03 |
1.80055682e+03 |
7.559e-05 |
7.559e-05 |
1.421e-14 |
2.520e-13 |
star_micro_vars |
512 | 1.67904925e+04 |
1.67915615e+04 |
1.67915615e+04 |
6.367e-05 |
6.367e-05 |
0.000e+00 |
1.907e-16 |
star_hydro_eqns |
512 | 3.22840078e+07 |
3.22840755e+07 |
3.22840755e+07 |
2.097e-06 |
2.095e-06 |
0.000e+00 |
2.999e-13 |
star_newton_step |
512 | 7.69959724e+04 |
8.57753821e+04 |
8.57753825e+04 |
1.140e-01 |
1.140e-01 |
2.932e-10 |
9.764e-10 |
star_remesh |
512 | 2.86562751e+05 |
4.25851086e+02 |
4.21135939e+02 |
9.985e-01 |
9.985e-01 |
0.000e+00 |
0.000e+00 |
star_evolve_step |
512 | 7.26765889e+03 |
7.26757413e+03 |
7.26757413e+03 |
1.166e-05 |
1.166e-05 |
3.587e-12 |
1.112e-12 |
star_micro_vars |
1024 | 3.36107957e+04 |
3.36128273e+04 |
3.36128273e+04 |
6.044e-05 |
6.045e-05 |
0.000e+00 |
3.682e-16 |
star_hydro_eqns |
1024 | 6.71023666e+07 |
6.71034373e+07 |
6.71034373e+07 |
1.596e-05 |
1.596e-05 |
0.000e+00 |
5.985e-13 |
star_newton_step |
1024 | 1.18210818e+05 |
1.29023078e+05 |
1.29023078e+05 |
9.147e-02 |
9.147e-02 |
1.131e-10 |
1.513e-10 |
star_remesh |
1024 | 5.73660892e+05 |
4.25843355e+02 |
4.21132239e+02 |
9.993e-01 |
9.993e-01 |
0.000e+00 |
0.000e+00 |
star_evolve_step |
1024 | 1.45656372e+04 |
1.45655283e+04 |
1.45655283e+04 |
7.477e-06 |
7.474e-06 |
7.599e-12 |
2.742e-11 |
2. Four-Way Runtime Tables (\(N_{\mathrm{zones}} \in \{128, 512, 1024\}\))¶
2.1 Environment¶
- Raw archive:
benchmarks/raw/26.4.1/(provenance.json,fortran_wave*.txt,rust_waves_1_to_5.txt,python_waves_1_to_5.json). - Capture timestamp (UTC):
2026-11-17T22:46:37Z(with cleanfortran_wave3b.txtandfortran_wave4.txtrerun from a relativeMESA_DIRlayout at2026-11-17T23:25:34Zon base commitb5b6abd). - Continuous verification:
ci_continuous_verification = false(CI builds and tests Safe Rust, PyO3, and JAX without a MESA installation, so the Fortran comparators run offline on a workstation). - Host hardware:
AMD Ryzen 7 9800X3D 8-Core Processor(16 logical cores,OMP_NUM_THREADS=4,RAYON_NUM_THREADS=4),NVIDIA GeForce RTX 5080,Linux x86_64. - Toolchains: MESA
r26.4.1, SDKx86_64-linux-26.6.1,GNU Fortran (GCC) 15.2.0(-O2 -fopenmp -cpp -ffree-form -ffree-line-length-none),rustc 1.100.0 (0ef1bc386 2026-11-09),Python 3.14.0, JAX0.11.0(gpu,jax_enable_x64=True). - Workload taxonomy (
28workloads,84(workload, N_zones)points):21full MESAr26.4.1workloads,3mixed MESA0-1/ Ref. Fortran2-3workloads (auto_diff,mtx_tridiag,chem_comp),3hybrid Reference Fortran workloads (w5_diff_rot,w5_binary_rlof,w5_astero_seism), and1standalone non-MESA Reference Fortran workload (w5_riemann_rsp2).
2.2 Fortran MESA r26.4.1 (benchmarks/fortran_mesa/run_wave4_bench)¶
| Workload | \(N_{\mathrm{zones}}\) | Stage 0 (\(\mu\mathrm{s}\)) | Stage 1 (\(\mu\mathrm{s}\)) | Stage 2 (\(\mu\mathrm{s}\)) | Stage 3 (4t OpenMP) (\(\mu\mathrm{s}\)) | Stage 0 / Stage 2 | Stage 0 / Stage 3 |
|---|---|---|---|---|---|---|---|
star_micro_vars |
128 | 10040.95 +/- 172.91 |
10071.10 +/- 144.57 |
9774.77 +/- 290.49 |
2614.26 +/- 212.32 |
1.03x |
3.84x |
star_hydro_eqns |
128 | 1445.29 +/- 66.00 |
1468.19 +/- 31.62 |
1473.69 +/- 44.78 |
384.29 +/- 1.65 |
0.98x |
3.76x |
star_newton_step |
128 | 1555.40 +/- 55.54 |
1524.89 +/- 33.25 |
1534.08 +/- 45.34 |
427.53 +/- 30.89 |
1.01x |
3.64x |
star_remesh |
128 | 3.29 +/- 0.05 |
3.33 +/- 0.03 |
3.24 +/- 0.01 |
3.24 +/- 0.01 |
1.02x |
1.02x |
star_evolve_step |
128 | 116682.57 +/- 1626.70 |
115963.39 +/- 1048.69 |
116376.80 +/- 2995.41 |
31224.44 +/- 2701.74 |
1.00x |
3.74x |
star_micro_vars |
512 | 39415.76 +/- 514.27 |
40577.17 +/- 1427.94 |
39660.01 +/- 1141.95 |
10108.76 +/- 227.63 |
0.99x |
3.90x |
star_hydro_eqns |
512 | 5844.63 +/- 313.95 |
5868.39 +/- 94.77 |
5826.24 +/- 58.84 |
1489.77 +/- 13.89 |
1.00x |
3.92x |
star_newton_step |
512 | 6353.92 +/- 219.98 |
6379.89 +/- 591.03 |
6152.53 +/- 383.72 |
1628.93 +/- 88.18 |
1.03x |
3.90x |
star_remesh |
512 | 10.86 +/- 0.34 |
11.04 +/- 0.05 |
10.70 +/- 0.02 |
10.71 +/- 0.01 |
1.01x |
1.01x |
star_evolve_step |
512 | 419361.32 +/- 2947.64 |
419532.81 +/- 4194.12 |
421364.11 +/- 2945.52 |
109793.71 +/- 7285.24 |
1.00x |
3.82x |
star_micro_vars |
1024 | 79042.73 +/- 1155.17 |
78848.63 +/- 709.73 |
79607.37 +/- 3120.44 |
20756.76 +/- 1246.36 |
0.99x |
3.81x |
star_hydro_eqns |
1024 | 11725.37 +/- 468.27 |
11670.62 +/- 329.89 |
11972.73 +/- 738.11 |
2962.80 +/- 95.66 |
0.98x |
3.96x |
star_newton_step |
1024 | 12594.35 +/- 1976.23 |
12279.23 +/- 170.65 |
12198.39 +/- 211.83 |
3165.36 +/- 62.46 |
1.03x |
3.98x |
star_remesh |
1024 | 22.18 +/- 1.57 |
22.27 +/- 0.02 |
21.65 +/- 0.03 |
21.93 +/- 7.42 |
1.02x |
1.01x |
star_evolve_step |
1024 | 920548.21 +/- 6535.70 |
925584.70 +/- 11064.02 |
917795.98 +/- 9093.73 |
235422.09 +/- 13343.55 |
1.00x |
3.91x |
2.3 Safe Rust (strict, --release)¶
| Workload | \(N_{\mathrm{zones}}\) | Stage 0 (\(\mu\mathrm{s}\)) | Stage 1 (\(\mu\mathrm{s}\)) | Stage 2 (\(\mu\mathrm{s}\)) | Stage 3 (4t rayon) (\(\mu\mathrm{s}\)) |
Stage 0 / Stage 2 | Stage 0 / Stage 3 |
|---|---|---|---|---|---|---|---|
star_micro_vars |
128 | 2714.59 +/- 675.01 |
2628.61 +/- 732.38 |
2543.36 +/- 253.25 |
2478.94 +/- 595.16 |
1.07x |
1.10x |
star_hydro_eqns |
128 | 2611.51 +/- 551.75 |
2556.66 +/- 415.14 |
2760.16 +/- 664.37 |
2461.81 +/- 377.07 |
0.95x |
1.06x |
star_newton_step |
128 | 3056.69 +/- 447.31 |
2656.83 +/- 653.55 |
2696.44 +/- 314.15 |
4583.29 +/- 3120.76 |
1.13x |
0.67x |
star_remesh |
128 | 6298.78 +/- 539.85 |
54.84 +/- 0.61 |
26.53 +/- 0.06 |
114.45 +/- 6.59 |
237.42x |
55.04x |
star_evolve_step |
128 | 13366.30 +/- 1147.46 |
17551.26 +/- 2320.80 |
18245.15 +/- 2148.08 |
11381.22 +/- 1024.97 |
0.73x |
1.17x |
star_micro_vars |
512 | 7509.64 +/- 430.71 |
7288.04 +/- 447.69 |
7217.90 +/- 602.99 |
7034.45 +/- 427.11 |
1.04x |
1.07x |
star_hydro_eqns |
512 | 7605.02 +/- 244.39 |
7766.94 +/- 635.90 |
7519.39 +/- 467.75 |
7399.95 +/- 130.22 |
1.01x |
1.03x |
star_newton_step |
512 | 7627.14 +/- 642.78 |
7841.94 +/- 490.75 |
7752.99 +/- 173.99 |
7560.01 +/- 509.10 |
0.98x |
1.01x |
star_remesh |
512 | 11570.55 +/- 736.48 |
218.67 +/- 7.67 |
105.65 +/- 0.08 |
198.17 +/- 6.31 |
109.52x |
58.39x |
star_evolve_step |
512 | 32019.71 +/- 839.86 |
37460.47 +/- 1344.72 |
37578.22 +/- 1934.43 |
31973.23 +/- 1723.49 |
0.85x |
1.00x |
star_micro_vars |
1024 | 14577.70 +/- 546.50 |
13198.33 +/- 743.98 |
13196.81 +/- 759.65 |
13153.37 +/- 771.08 |
1.10x |
1.11x |
star_hydro_eqns |
1024 | 15279.20 +/- 407.75 |
13973.75 +/- 223.89 |
14088.93 +/- 291.82 |
13814.92 +/- 804.86 |
1.08x |
1.11x |
star_newton_step |
1024 | 14131.58 +/- 484.28 |
14583.97 +/- 1071.55 |
14420.08 +/- 355.05 |
14296.08 +/- 1225.88 |
0.98x |
0.99x |
star_remesh |
1024 | 13766.12 +/- 349.58 |
489.01 +/- 21.74 |
223.41 +/- 0.88 |
340.46 +/- 15.30 |
61.62x |
40.43x |
star_evolve_step |
1024 | 57696.49 +/- 1215.26 |
62383.25 +/- 1154.84 |
63085.87 +/- 2338.83 |
59578.93 +/- 1076.59 |
0.91x |
0.97x |
2.4 Python / PyO3 & JAX float64¶
| Workload | \(N_{\mathrm{zones}}\) | Stage 0 PyO3 1t (\(\mu\mathrm{s}\)) | Stage 1 PyO3 4t (\(\mu\mathrm{s}\)) | Stage 2 JAX @jit (\(\mu\mathrm{s}\)) |
Stage 2 Compile (\(\mathrm{ms}\)) | Stage 3 JAX vmap (\(\mu\mathrm{s}\)) |
Stage 3 Compile (\(\mathrm{ms}\)) |
|---|---|---|---|---|---|---|---|
star_micro_vars |
128 | 2893.62 +/- 123.68 |
2691.15 +/- 333.14 |
1534.09 +/- 181.72 |
212.8 |
384.61 +/- 33.06 |
206.5 |
star_hydro_eqns |
128 | 2793.22 +/- 365.81 |
2963.84 +/- 396.48 |
2115.79 +/- 973.18 |
275.9 |
564.36 +/- 47.99 |
276.2 |
star_newton_step |
128 | 25.33 +/- 2.14 |
2737.00 +/- 1706.93 |
1721.79 +/- 350.23 |
367.1 |
2973.87 +/- 1861.17 |
45.4 |
star_remesh |
128 | 1512.97 +/- 937.71 |
1294.76 +/- 57.19 |
1246.71 +/- 32.20 |
1.3 |
50.25 +/- 10.72 |
48.3 |
star_evolve_step |
128 | 13175.29 +/- 662.31 |
19580.13 +/- 1908.30 |
19450.28 +/- 2014.32 |
0.0 |
20051.89 +/- 1404.33 |
94.2 |
star_micro_vars |
512 | 7299.81 +/- 608.61 |
7391.20 +/- 574.50 |
1545.43 +/- 113.33 |
202.8 |
402.05 +/- 14.79 |
210.2 |
star_hydro_eqns |
512 | 7783.63 +/- 267.70 |
7891.49 +/- 531.77 |
2157.14 +/- 68.68 |
275.8 |
612.47 +/- 119.27 |
265.5 |
star_newton_step |
512 | 103.19 +/- 2.59 |
1805.69 +/- 3647.30 |
2846.89 +/- 990.11 |
344.8 |
1518.58 +/- 1113.81 |
46.0 |
star_remesh |
512 | 1055.36 +/- 588.93 |
1270.82 +/- 40.10 |
1266.73 +/- 7.55 |
1.3 |
63.43 +/- 4.31 |
47.7 |
star_evolve_step |
512 | 32443.13 +/- 1399.75 |
39503.94 +/- 1269.62 |
38312.54 +/- 1453.66 |
0.0 |
40263.30 +/- 1089.84 |
108.9 |
star_micro_vars |
1024 | 13402.37 +/- 140.72 |
13580.23 +/- 652.11 |
1555.02 +/- 74.79 |
201.4 |
392.63 +/- 22.53 |
208.0 |
star_hydro_eqns |
1024 | 14427.72 +/- 650.95 |
14760.55 +/- 699.27 |
1957.63 +/- 851.52 |
272.6 |
541.21 +/- 280.41 |
268.2 |
star_newton_step |
1024 | 204.75 +/- 29.02 |
642.92 +/- 199.70 |
3005.96 +/- 174.67 |
327.0 |
2774.89 +/- 3480.32 |
49.2 |
star_remesh |
1024 | 1524.88 +/- 1005.04 |
199.04 +/- 66.81 |
195.19 +/- 24.32 |
0.2 |
47.41 +/- 11.10 |
48.2 |
star_evolve_step |
1024 | 57947.11 +/- 1711.63 |
64199.40 +/- 1573.98 |
64630.34 +/- 2424.30 |
0.0 |
66017.92 +/- 2407.91 |
132.7 |
3. Key Wave 4 Disclosures (\(N_{\mathrm{zones}} = 1024\))¶
- Workloads where MESA Fortran is faster: At 4 threads, MESA
r26.4.1outperforms Safe Rust onstar_hydro_eqns(2962.80 usvs.13814.92 us) andstar_newton_step(3165.36 usvs.14296.08 us). Thestar_remeshtimings (21.93 usFortran vs.340.46 usRust) are not a like-for-like comparison: the Fortran stage times onlyset_mesh_function_data, the Rust stage the wholedo_adjust_mesh. star_newton_stepStage 0 PyO3 (204.75 us): Benchmarks only the Rustbcycliclinear solve withouteval_equations, whereas Fortran and Rust full-step stages include equation residual and Jacobian setup.star_evolve_stepunequal timestep: Fortran setss% dt = 100 s(N=8pre-flight check logsierr -1) while Rust steps withbase.dt.