Skip to content

rstsr-openblas: make openmp a default feature - #94

Merged
ajz34 merged 2 commits into
RESTGroup:masterfrom
ajz34:feat/openmp-default
Aug 14, 2026
Merged

rstsr-openblas: make openmp a default feature#94
ajz34 merged 2 commits into
RESTGroup:masterfrom
ajz34:feat/openmp-default

Conversation

@ajz34

@ajz34 ajz34 commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

  • rstsr-openblas: default = ["linalg", "openmp"] — an OpenMP runtime (gomp/omp/vcomp) must be linked when default features are used. Compatible with pthread-built OpenBLAS (verified against OpenBLAS 0.3.34 built both ways); opt out via default-features = false, features = ["linalg"].
  • rstsr: default features now enable rstsr-openblas?/openmp (effective whenever the openblas feature is on).
  • Fix: OpenBLASConfig::get_parallel panicked whenever openmp/dynamic_loading were both off, even on pthread builds — now it panics only when the library actually reports OPENBLAS_OPENMP.
  • Panic guidance rewritten; readme documents the compatibility matrix and opt-out.
  • CI: new unittests-pthread job (default features, --test-threads=1).

Breaking

Default-feature users (device crate directly, or rstsr defaults + openblas) gain a hard OpenMP-runtime link requirement. Target version: 0.8.0.

ajz34 and others added 2 commits August 14, 2026 22:33
- `rstsr-openblas`: default features are now `linalg` + `openmp`; an OpenMP
  runtime (`gomp`/`omp`/`vcomp`) must be linked when default features are
  used. The feature remains compatible with pthread-built OpenBLAS (verified
  against OpenBLAS 0.3.34 built both ways); opt out via
  `default-features = false, features = ["linalg"]`.
- `rstsr`: default features now enable `rstsr-openblas?/openmp` (effective
  whenever the `openblas` feature is on); no separate `openmp` feature is
  exposed at the `rstsr` level.
- `rstsr-openblas` (fix): the internal `OpenBLASConfig::get_parallel`
  panicked whenever `openmp`/`dynamic_loading` were both off, even for
  pthread-built OpenBLAS; it now panics only when the library actually
  reports `OPENBLAS_OPENMP`.
- rewrite the OpenMP-detection panic guidance in `threading.rs`; document
  the compatibility matrix and opt-out in the crate readme.
- CI: add `unittests-pthread` job (libopenblas-pthread-dev, default
  features, `--test-threads=1`).

Breaking: direct users of `rstsr-openblas` default features, and users of
`rstsr` with default features plus `openblas`, gain a hard OpenMP-runtime
link requirement. Target version: 0.8.0 (to be set by hand at release).

Most or all contents generated by AI (model glm-5.3).

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: glm-5.3 <service@zhipuai.cn>
Ubuntu noble's libopenblas0-pthread (0.3.26) overflows libtest's default
2 MiB test-thread stack in driver_impl::lapack_solve_f64::test_dgesv
(PR CI caught this on the new unittests-pthread job). Locally built
OpenBLAS 0.3.34 pthread passes the same suite even with 512 KiB, and the
openmp job passes on the same runner, so this is specific to the distro
pthread build. Set RUST_MIN_STACK=16 MiB on that job's test step.

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: glm-5.3 <service@zhipuai.cn>
@ajz34
ajz34 merged commit 9b80032 into RESTGroup:master Aug 14, 2026
9 checks passed
@ajz34
ajz34 deleted the feat/openmp-default branch August 14, 2026 15:03
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.

1 participant