Skip to content

WP0 0.8, 0.4, 0.10: build without graphics, close silent test gaps, generated files out of git - #38

Open
tproffen wants to merge 4 commits into
claude-python-appfrom
claude/inspiring-brahmagupta-ne81m7
Open

tproffen wants to merge 4 commits into
claude-python-appfrom
claude/inspiring-brahmagupta-ne81m7

Conversation

@tproffen

Copy link
Copy Markdown
Owner

Merges into claude-python-app (not master).

Finishes the remaining WP0 tasks except the nightly job for slow tests. CI is green on the head commit (both jobs).

0.8 – build fixes

  • -DDIFFUSE_GRAPHICS=OFF builds without PGPLOT and X11. suite/prog and python/ only look for and link PGPLOT, X11 and PNG when graphics are on (KUPLOT already had no-graphics replacements). ldd of discus_suite and suite_python*.so shows no graphics libraries.
  • FC is no longer required. CMake picks the Fortran compiler itself (FC or -DCMAKE_Fortran_COMPILER still choose a specific one).
  • make install finds grfont.dat and pgxwin_server in PGPLOT_DIR or the usual system places (Ubuntu: /usr/lib/pgplot5, /usr/bin), skips a missing one with a warning, and installs nothing PGPLOT-related without graphics. -DPGPLOT_DIR is no longer needed on Ubuntu.
  • CI has a second job, python-nographics: no PGPLOT/X11/Xvfb packages, graphics off, an ldd check, pytest and the docs (the set-up of the future Python package). The linux job keeps the graphics build for the legacy macro tests, now without FC, CC, CXX or PGPLOT_DIR. publish-docs waits for both.

0.4 – no more silent sections

  • 03.pdf now checks its results: the 9 PDFs are compared with references in 03.Pair_Distribution_Function/RESULTS/ (the formerly committed .grcalc files; a fresh run reproduces them to R ≤ 2e-9) by check_pdf.mac. An altered reference gives FAIL.
  • 09.znse_pdf_serial (new): the ZnSe DIFFEV refinement without MPI (test_serial.mac, 4 generations, ~3 min, tag slow); checks the best R-value is in (0, 1) and does not get worse (0.321 → 0.251). The .sh scripts get their execute bit, so test_all.mac's MPI variant runs where mpiexec exists.
  • 04.sro2 stays disabled with the measured reason: with seed 1234 the MMC reaches C100 = 0.84 and C010 = −0.85 for targets ±0.70; the check allows 0.10. Needs your decision: tolerance, MC settings, or remove.

0.10 – generated files out of git

  • A full test run writes 827 files; 816 were committed (57.8 MB of the 110 MB in tests/). They are removed.
  • tests/.gitignore lists them, generated from that run (16 output-only folders kept by .gitkeep, 95 single files, plus pdf.mac's PDFs and fort.*).
  • Checked: a copy of tests/ without them gives the same results; copying every file a test run writes back into the tree leaves git status clean.

Findings

  • 04.sro3's broken Fourier result (Infinity/NaN) is reproducible on the development machine with run_legacy_tests.py --id 04.sro3 (seed 1234), on both builds, while CI passes. The trigger is state the MMC run leaves in memory (the same final structure read from file gives a correct Fourier), so most likely uninitialised memory. Details in the WP0 log.
  • echo supports %f but not %e ("%12.4e" fails with "Missing ' while comparing stings").
  • An earlier commit on this branch broke 4 Python tests (moved PDF references); fixed in e0c27d0.

Checked locally

  • run_legacy_tests.py --check-test-all: manifest and test_all.mac agree.
  • pytest tests/python (no-graphics build): 81 passed, 2 known failures.
  • Sphinx docs with -W: clean.
  • Legacy tests --tags fast,mc: 30 PASS, 04.sro3 ABORTED (as above; passes in CI).

Generated by Claude Code

- DIFFUSE_GRAPHICS=OFF now builds without PGPLOT and X11: suite/prog and
  python/ no longer look for or link PGPLOT, X11 and PNG unless graphics
  are on (KUPLOT already had no-graphics replacements). ldd of
  discus_suite and suite_python shows no graphics libraries.
- CMake picks the Fortran compiler itself; FC is optional (the old
  set(CMAKE_Fortran_COMPILER $ENV{FC}) after enable_language had no effect).
- make install looks for grfont.dat and pgxwin_server in PGPLOT_DIR and the
  usual system places (Debian/Ubuntu: /usr/lib/pgplot5, /usr/bin), skips a
  missing one with a warning, and installs none without graphics.
- CI: new python-nographics job (no PGPLOT/X11/Xvfb installed, graphics
  off, ldd check, pytest, docs); the linux job keeps the graphics build for
  the legacy macro tests, now without FC/CC/CXX/PGPLOT_DIR.
- Build instructions updated (CLAUDE.md, docs/install.md, python/README.md,
  tests/README.md); WP0 log: 0.8 done, and a reproducible case of the
  04.sro3 broken Fourier result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yw8KkfPLawp8Po4f5Bc9v
- 03.pdf now checks its results: the 9 PDFs it writes are compared with
  references in RESULTS/ (the committed .grcalc files, which a fresh run
  reproduces to R <= 2e-9) by the new check_pdf.mac (R < 1e-6). Verified
  that an altered reference gives FAIL. test_all.mac calls check.mac.
- 09: new 09.znse_pdf_serial runs the ZnSe DIFFEV refinement without MPI
  (test_serial.mac, 4 generations, ~3 min, tag slow) and checks that the
  best R-value is in (0, 1) and does not get worse (0.321 -> 0.251).
  TEST.sh and the other .sh files get their execute bit, so test_all.mac's
  MPI variant can run where mpiexec is available.
- 04.sro2 stays disabled with the measured reason: with seed 1234 the MMC
  reaches C100 = 0.84 / C010 = -0.85 for targets +-0.70 (check allows 0.10).
- DISCUS quirk found on the way: echo supports %f but not %e ("%12.4e"
  fails with "Missing ' while comparing stings").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yw8KkfPLawp8Po4f5Bc9v
The 0.4 commit moved them there; test_fourier_pdf.py still read them from
the old place, which failed 4 tests in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yw8KkfPLawp8Po4f5Bc9v
A full test run (all tests except MPI) writes 827 files; 816 of them were
committed (57.8 MB of the 110 MB in tests/): stacking outputs, DIFFEV
generations, plot CIFs, intermediate structures, intensity files. None
are under RESULTS/ or golden/.

- The 816 files are removed. A copy of tests/ without them gives the same
  test results as before.
- tests/.gitignore lists them (generated from that run): 16 folders with
  only generated files, each kept by an empty .gitkeep because the macros
  write into them, and 95 single files next to inputs; plus the PDFs
  pdf.mac writes next to RESULTS/, and fort.* files.
- Copying every file of a test run back into the tree leaves git status
  clean.
- tests/README.md: new step for adding tests (keep outputs out of git);
  WP0 log: 0.4 and 0.10 done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yw8KkfPLawp8Po4f5Bc9v

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants