Skip to content

Commit 8ce5cc6

Browse files
authored
Merge pull request #89 from SMI-Lab-Inha/fix-validation-blas-determinism
ci(validation): pin BLAS threads for deterministic integration runs
2 parents 8e36a60 + 5bf73e1 commit 8ce5cc6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎.github/workflows/validation.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,24 @@ jobs:
6161
runs-on: ubuntu-latest
6262
timeout-minutes: 30
6363

64+
# Pin BLAS/LAPACK to a single thread so the dense eigensolver
65+
# returns a *reproducible* eigenvector basis for near-degenerate
66+
# eigenpairs (notably the 2nd tower fore-aft / side-side pair).
67+
# Multi-threaded OpenBLAS can hand back a different orthonormal
68+
# basis of a degenerate eigenspace run-to-run; the ElastoDyn
69+
# polynomial fit for that block is basis-sensitive, which made the
70+
# ``test_validate.py`` patch round-trip ratio flake to ~2x on Linux
71+
# CI (it passes deterministically single-threaded and on Windows).
72+
# Single-threaded BLAS makes the integration suite deterministic.
73+
# Follow-up: make the degenerate-pair canonicalisation in
74+
# ``pybmodes.elastodyn`` basis-invariant so multi-threaded users get
75+
# identical coefficients too — this only hardens the CI gate.
76+
env:
77+
OMP_NUM_THREADS: "1"
78+
OPENBLAS_NUM_THREADS: "1"
79+
MKL_NUM_THREADS: "1"
80+
NUMEXPR_NUM_THREADS: "1"
81+
6482
steps:
6583
- uses: actions/checkout@v4
6684

0 commit comments

Comments
 (0)