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

Open
#1,046 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
numpy, python
Domain
backend, data

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
25
Forks
25
Avg merge
4h 5m
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/PyBNF

All issues in lanl/PyBNF

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.