Repository navigation
Description
What a reader sees
The live gradual_liberalization_network page prints first year of free trade: 32, and the paragraph under it says the Ramsey plan reaches "free trade after 31 years". The printed year is 31 or 32 depending on which machine built the page, and so are two other printed results: growth_in_dles' non-stochastic steady state and tsyrennikov_2013's LE mean RSI. The code, the environment and the pull requests don't cause the difference. It comes from the CPU of the GitHub-hosted runner that executes the notebooks.
What was measured
On 2026-11-22, fresh builds of main and of several pull requests used the same environment (MKL 2025.0, NumPy 2.4.6, SciPy 1.18.0, jax 0.12.1, quantecon 0.13.1) but printed different values. To find out why, a temporary branch, cpu-probe, recorded each runner's CPU and ran the three lectures, unchanged, on six runners: one full build (run 45062890211) and five jobs in parallel (run 45071926735). GitHub assigned three kinds of machine, and each kind printed the same values every time:
| Runner's CPU | Cloud | MKL's code path, as MKL reports it | growth_in_dles steady state (c, i, k) | gradual_liberalization_network first year of free trade | tsyrennikov_2013 LE mean RSI |
|---|---|---|---|---|---|
| Intel Xeon 6975P-C | AWS | AVX-512 | 5, 0, 0 | 31 | 0.7676 |
| AMD EPYC 9V74 | Azure | generic ("Intel(R) Architecture processors") | 4.999, −0.001, −0.016 | 31 | 0.7676 |
| AMD EPYC 7763 | Azure | generic ("Intel(R) Architecture processors") | 4.999, −0.001, −0.016 | 32 | 0.7653 |
The earlier builds didn't record their CPUs, but each matches one row exactly, down to the last digits of small residuals: for example, gradual_liberalization_network's printed residual is 6.3e-12, 9.2e-12 and 8.8e-12 on the three rows respectively. Main's build (run 45012283119) matches the Intel row. The build of #420 at 944bb48 (run 45019320292) matches the EPYC 9V74 row. The builds of #421, #423 and #420's first head (run 45012294654, run 45018184850, run 45012288717) match the EPYC 7763 row. So does the live site, last published at 02:39 UTC on 2026-11-22, residuals included.
Why each lecture moves
- growth_in_dles. The largest endogenous eigenvalue,
econ1.endo[1], is 0.9999999999904766 on the Intel runner and 0.9999999999904767 on the AMD runners, and quantecon computes the steady state from the null space of I − A0, which a second eigenvalue this close to 1 makes badly conditioned, so a change in the 16th digit reaches the printed values. MKL picks its code path to suit the CPU and uses its generic path on these AMD processors. WithMKL_CBWR=COMPATIBLE, which holds MKL to that generic path, the Intel runner prints the AMD values too. The lecture already says that, because of the near-unity eigenvalue, "these steady state values are of little relevance". - gradual_liberalization_network. The printed year is
np.argmax(τ_R < 1e-4)on the tariff path thatscipy.optimize.minimize(L-BFGS-B) returns. The tariff in year 31,τ_R[31], is close enough to the 1e-4 cutoff that small differences in the optimiser's result put it on either side. Both MKL's code path and the CPU change the year:MKL_CBWR=COMPATIBLEgives 32 on both the Intel and the EPYC 9V74 runners, while the EPYC 7763 gives 32 without it and 31 with it. The text's "after 31 years" is right on two of the three machine types. - tsyrennikov_2013. Only the EPYC 7763 prints 0.7653.
MKL_CBWR=COMPATIBLEdoesn't change the value on any runner. On the Intel runner, neither holding NumPy's own SIMD code back from AVX-512 (NPY_DISABLE_CPU_FEATURES) nor holding XLA to AVX2 (XLA_FLAGS=--xla_cpu_max_isa=AVX2) reproduces it, so it isn't established which library carries the difference. The text quotes the paper's value ("about 0.80 on average"), not the computed one, so nothing a reader sees disagrees.
Suggestions
- gradual_liberalization_network: make the text agree with the output on any machine. For example, the text could give the year approximately ("after about 30 years"), or the code could test against a cutoff that the solution is well clear of. Tighter optimiser tolerances might also move
τ_R[31]away from the cutoff, but that is untested. This is the only one of the three that a reader can see. - growth_in_dles and tsyrennikov_2013: no change is needed, since neither text depends on the exact printed values.
- Optionally,
cache.ymlcould printlscpu, so that each build's machine is on record. Without that, a comparison of two fresh builds shows these lectures as different, with no way to tell why.
The cpu-probe branch holds only the temporary diagnostic workflow and isn't for merging; it can be deleted once this has been read. Its artefacts (cpu-probe, and cpu-probe-1 to cpu-probe-5) hold each runner's lscpu output and the executed notebooks.
Activity