run_all.py — src/35-hadrons

The file src/35-hadrons/run_all.py of the validation package of the paper 35-hadr, rendered with an anchor per line; the file itself is beside this page.

35-hadrons ledgersrc/35-hadrons/run_all.py · 1.6 KBrun_all.py
1"""2run_all.py — the 35-hadrons validation package, end to end3==========================================================4Runs the sixteen scripts through the registry (hadcommon), writes results.json — one record per family, carrying5the paper's ledger row(s) it witnesses — and exits nonzero if any family fails. Python ≥ 3.10 with numpy and sympy6(matplotlib for the figure script); ≈ 40 s, the finite-grid eigenvalue towers dominating. The figure script writes7the paper's two figures into figures/.89    python3 run_all.py1011Families (one per script, in the README's order):12    su3_singlet carrier_residue | su3f_relations su3f_second_order hyperfine_charsum isospin_cottingham heavy_flavour13    | em_heavy_cmag absolute_masses vector_nonet subhorizon_resolution | confinement_completion final_resolution14    confinement_closure forward_eigenvalues | make_figures15"""16import sys, time17import hadcommon1819FAMILIES = ["had." + s for s in [20    "su3_singlet", "carrier_residue",21    "su3f_relations", "su3f_second_order", "hyperfine_charsum", "isospin_cottingham", "heavy_flavour",22    "em_heavy_cmag", "absolute_masses", "vector_nonet", "subhorizon_resolution",23    "confinement_completion", "final_resolution", "confinement_closure", "forward_eigenvalues",24    "make_figures"]]2526def main():27    t0 = time.time()28    for fam in FAMILIES:29        print(f"\n— {hadcommon.script_of(fam)}.py")30        hadcommon.run_block(fam)31    ok = hadcommon.summary(write=True)32    print(f"{len(hadcommon.RESULTS)} families, {len(hadcommon.MICRO)} micro-checks, {time.time() - t0:.0f} s; results.json written")33    sys.exit(0 if ok else 1)3435if __name__ == "__main__":36    main()37