Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Accelerate framework is not necessary when using openblas #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

msakai
Copy link

@msakai msakai commented Jun 25, 2024

Accelerate is a framework that provides BLAS and LAPACK. And I think that Accelerate is unnecessary if you use BLAS/LAPACK provided by other libraries such as openblas.

I tested the PR with macOS 13.6.6 on Apple M1, GHC-9.6.5 (aarch64-osx), openblas-0.3.27 from HomeBrew, and the following stack.yaml:

flags:
  hmatrix:
    openblas: true
  hmatrix-special:
    safe-cheap: false
  hmatrix-tests:
    gsl: true
  hmatrix-gsl:
    onlygsl: false
packages:
- packages/tests/
- packages/special/
- packages/gsl/
- packages/glpk/
- packages/base/
- examples/
resolver: lts-22.26
nix:
  path: [nixpkgs=./nixpkgs.nix]
  shell-file: shell.nix
extra-include-dirs:
- /opt/homebrew/Cellar/openblas/0.3.27/include
extra-lib-dirs:
- /opt/homebrew/Cellar/openblas/0.3.27/lib

stack test works fine except for the following error:

hmatrix-tests  > ------ ldlSolve
hmatrix-tests  > +++ OK, passed 100 tests.
hmatrix-tests  > *** Failed! (after 5 tests):
hmatrix-tests  > Exception:
hmatrix-tests  >   ldlC: code 1
hmatrix-tests  >   CallStack (from HasCallStack):
hmatrix-tests  >     error, called at src/Internal/Devel.hs:52:21 in hmatrix-0.20.2-DaXP0Zz4Wa0HRiizEPfZT2:Internal.Devel
hmatrix-tests  > SqWC (1><1)
hmatrix-tests  >  [ 0.0 :+ 17.11902914746234 ]
hmatrix-tests  > Test suite hmatrix-base-testsuite failed

This error happened even when I used Accelerate, so it would be a different issue. If I commented out the test case, everything worked fine.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant