rstsr-openblas: make openmp a default feature - #94
Merged
Conversation
- `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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viadefault-features = false, features = ["linalg"].rstsr: default features now enablerstsr-openblas?/openmp(effective whenever theopenblasfeature is on).OpenBLASConfig::get_parallelpanicked wheneveropenmp/dynamic_loadingwere both off, even on pthread builds — now it panics only when the library actually reportsOPENBLAS_OPENMP.unittests-pthreadjob (default features,--test-threads=1).Breaking
Default-feature users (device crate directly, or
rstsrdefaults +openblas) gain a hard OpenMP-runtime link requirement. Target version: 0.8.0.