Skip to content

Commit bd9a974

Browse files
committed
mdtraj: Pin pyparsing<3.3.3 for tests, deselect test_compare_rdf_t_master
test_binary_selection_operator fails on every arch with pyparsing 3.3.3, whose shunting-yard infix_notation matches mdtraj's alphabetically sorted '>' before '>=' without backtracking; 3.3.2 passes on x86_64 too. test_compare_rdf_t_master's reference histogram is bit-exact to the x86 SSE distance kernel. riscv64 uses the scalar kernel with FMA contraction, which moves a few distances across bin edges; an x86_64 build with -D__NO_INTRINSICS -mfma -ffp-contract=fast reproduces the same 18 elements.
1 parent fd55def commit bd9a974

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

‎.github/workflows/build-mdtraj.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,28 @@ jobs:
8888
# Upstream's wheel job only smoke-tests; also run its CI suite against the wheel,
8989
# with its conda test env minus openmm (no riscv64 build; those tests skip).
9090
CIBW_TEST_EXTRAS: all
91-
CIBW_TEST_REQUIRES: gsd>=2.8
91+
# pyparsing 3.3.3 rewrote infix_notation as a shunting-yard parser that takes the
92+
# first operator in op_list order without backtracking. mdtraj sorts its operators
93+
# alphabetically, so '>' wins over '>=' and test_binary_selection_operator fails on
94+
# 'name >= 1' on every arch (x86_64 too, with upstream's PyPI wheel); 3.3.2 passes
95+
# (gotchas 355, 583). Upstream leaves pyparsing unpinned.
96+
CIBW_TEST_REQUIRES: 'gsd>=2.8 pyparsing<3.3.3'
9297
CIBW_TEST_SOURCES: tests pyproject.toml
98+
# Deselected for riscv64 rounding at a histogram bin edge (gotcha 304), not a wrong
99+
# result: test_compare_rdf_t_master compares to a reference file that matches the
100+
# x86 SSE distance kernel bit for bit. riscv64 builds the scalar vectorize_generic.h
101+
# kernel, and GCC contracts its float32 multiply-adds to fmadd.s, so a few pair
102+
# distances land across a 0.005 nm bin edge: 18/20000 elements off, as 9 adjacent-bin
103+
# pairs (e.g. [20,32]/[20,33]). On x86_64,
104+
# building with -D__NO_INTRINSICS -mfma -ffp-contract=fast gives the same 18
105+
# elements with the same values; without -mfma it passes; and mdtraj's own numpy
106+
# path (opt=False) misses this reference file at 10 elements.
93107
CIBW_TEST_COMMAND: >-
94108
python -c "import mdtraj; print(mdtraj.__version__)" &&
95109
mdconvert -h &&
96110
mdinspect -h &&
97111
pytest -n logical --durations=10 tests/ -r fE --color=yes
112+
--deselect tests/test_rdf.py::test_compare_rdf_t_master
98113
99114
- name: Check the wheel ships the licences and the compiled extensions
100115
run: |

0 commit comments

Comments
 (0)