Repository navigation
plan_v6_riemann
Fichier : plan_v6_riemann.md Dossier : wiki racine Branche : master (wiki) Auteur : hprzeta · MAJ : 2026-06-10
T=100 000, Turing-Backlund COMPLET, durée < 20 min (vs 105 min v2b actuelle).
Contrainte absolue : STEP ≤ 0.010 — seule valeur garantissant 0 manquant face aux
gaps GUE (
La formule STEP=δ(t)/3 produit STEP≈0.22 à
Distribution GUE (Montgomery-Odlyzko) :
Conclusion : STEP adaptatif basé sur δ seul ne fonctionne pas. L'accélération doit venir du scan en C, pas de la réduction du nombre de points.
N_WORKERS = min(8, multiprocessing.cpu_count())Gain estimé : ×1.3 (vs W=4) — RAM limitante sur 8 GB, mais 4 → 8 est faisable.
Implémentation : modifier N_WORKERS = 4 dans compute_zeros_v4_1.py.
Remplacer la boucle Python Z_batch numpy par un scan C entier.
/* scan_arb.c */
int scan_zeros_arb(double t_min, double t_max, double step,
double *out_a, double *out_b,
double *out_fa, double *out_fb, int n_max);Implémentation interne :
arb_fpwrap_cdouble_hardy_z(&z, t_courant, flags); // 0.77 ms, 0 malloc heap
if (z_prev * z_courant < 0) {
out_a[n] = t_prev; out_b[n] = t_courant;
out_fa[n] = z_prev; out_fb[n] = z_courant;
n++;
}Gain estimé : ×7.5 sur la phase scan (0.77 ms/appel vs Python loop overhead).
Prérequis : libflint accessible depuis C (déjà présent via python-flint 0.8.0).
Binding ctypes :
lib_scan = ctypes.CDLL("c_modules/scan_arb.so")
lib_scan.scan_zeros_arb.restype = ctypes.c_int
lib_scan.scan_zeros_arb.argtypes = [
ctypes.c_double, ctypes.c_double, ctypes.c_double,
ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double),
ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_double),
ctypes.c_int,
]scan_arb.c retourne déjà fa=Z(a) et fb=Z(b) → passer directement à illinois_refine(a,b,fa,fb,...).
Élimine 2 appels Arb par zéro dans l'affinage.
Gain estimé : ×1.5 sur la phase affinage.
Remplacer la segmentation 1/√t par une segmentation équilibrant
def _partitionner_NT(t_min, t_max, n_workers):
N_total = N_RV(t_max) - N_RV(t_min)
targets = [N_RV(t_min) + k * N_total // n_workers for k in range(n_workers + 1)]
# inverser N_RV pour trouver les T_j correspondants
bornes = [t_min] + [_chercher_T_pour_N(targets[k]) for k in range(1, n_workers)] + [t_max]
return bornesGain estimé : ×1.1 (workers plus synchrones, moins de temps perdu à attendre le plus lent).
| Configuration | Gain vs v2b (105 min) | Durée estimée |
|---|---|---|
| v2b (baseline) | ×1 | 105 min |
| + W=8 (L1) | ×1.3 | ~81 min |
| + scan_arb.c (L2) | ×7.5 sur scan | ~15–25 min |
| + cache fa/fb (L3) | ×1.5 sur affinage | ~12–18 min |
| + segmentation N(T) (L4) | ×1.1 | ~11–16 min |
| v6 cible (conservateur ×3) | — | ~35 min |
| v6 cible (optimiste) | — | ~15 min |
La phase scan représente ~60 % du temps total à T=100k. Avec scan_arb.c ×7.5, on divise ce goulot par 7.5 → gain global ×3–5 sur le temps total.
Avec Illinois_C à 85 ms/appel (mesuré) et W=8. Le plancher absolu est ~9 min.
# Vérifier libflint accessible depuis C
pkg-config --libs flint # ou chercher libflint dans le système
find /usr -name "libflint*.so" 2>/dev/null
# Compiler scan_arb.c (exemple)
gcc -O3 -march=native -fPIC -shared -o scan_arb.so scan_arb.c \
$(pkg-config --cflags --libs flint) -lm
# Tester le binding
python -c "import ctypes; lib = ctypes.CDLL('./scan_arb.so'); print('OK')"- Benchmark préalable : chronomètre par phase sur T=5 000 (scan vs affinage) → confirmer que scan est bien le goulot et quantifier le gain Arb
- L2 — scan_arb.c : levier principal (×7.5 estimé)
- L3 — cache fa/fb : intégration facile avec L2
- L1 — W=8 : 1 ligne, tester la RAM
- L4 — segmentation N(T) : raffinement final
- Test T=10 000 v6 : Turing-Backlund COMPLET, LMFDB ≥ 19/20 < 1e-10
- Test T=100 000 v6 : Turing-Backlund COMPLET, 0 manquant
- Comparaison CSV v2b vs v6 : diff sur les 20 premiers zéros LMFDB < 1e-10
plan_v6_riemann.md · wiki racine · master · hprzeta · MAJ 2026-06-10 · ~130 lignes