An lwf_continue run on another numpy version or CPU cannot write what the uninterrupted run wrote, and the state file's fingerprint records neither

Aperta
#1,046 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
numpy, python
Ambito
backend, data

Direzione di ricerca

Read docs/algorithms.rst and LiuWestFilter._build_fingerprint in pybnf/algorithms/filters/liu_west.py (around line 651), then review issue #1035 for the reported numerical differences. Decide how the fingerprint or documented promise should account for NumPy and CPU differences; done means the continuation behavior or its documented guarantee clearly reflects those differences.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

docs/algorithms.rst promises that an lwf_continue run "writes byte for byte what an uninterrupted run writes". The state file's fingerprint (LiuWestFilter._build_fingerprint, pybnf/algorithms/filters/liu_west.py:651) records the PyBNF and bngsim versions and their builds, but nothing about numpy or the CPU.

Why that breaks the promise. numpy's results for exp, log and pow differ in the last bit between versions and between SIMD paths. #1035 measured it: on AVX-512 CPUs with numpy 1.26, SVML and the C library disagree for about a quarter of float64 pow values. A run continued on another numpy, or on a node with or without AVX-512, therefore cannot write the uninterrupted run's bytes, and nothing says so.

Options:

  • Record numpy's version, and maybe np.show_runtime()'s SIMD features, in the fingerprint. Refuse on a mismatch, or warn.
  • Narrow the documented promise to the same numpy and CPU.

Raising the numpy floor to 2.x would remove the address dependence #1035 fixed, but not differences between versions or CPUs.

Lingua principale
Python
Stelle
25
Fork
25
Merge medio
4h 5m
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lanl/PyBNF

Tutte le issue di lanl/PyBNF

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.