-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arpack: use openblas on darwin; fix build; enable eigen #367594
Conversation
I'm not familiar with the Darwin platform and don't have access to it. Therefore, I can't provide meaningful comments. However, the information at https://developer.apple.com/documentation/accelerate/blas/ may be relevant. |
thanks. we've had this issue with other packages and the solution is to use the nixpkgs default (openblas). mostly cc'd cause this change either needs to move forward or the other one backed out given that darwin is currently broken. cc: @emilazy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. (Is Accelerate.framework not handling single precision a known thing and definitely not something we’re holding wrong somehow?)
https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/arpack.rb is also using openblas tho they don't seem to be enabling the feature which caused tests to segfault. |
tho they seem to make it work: https://github.com/opencollab/arpack-ng/actions/runs/11434914625/job/31809312118 the
but using openblas (and without the |
ok. so those tests fail on all platforms when I suppose now to figure out why when [edit] tho https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html |
ok -- |
10760d2
to
6362067
Compare
Change 07cdea2 uncovered a bug in how we build arpack on darwin with the Accelerate. Disable the Accelerate framework and use openblas the default nixpkgs blas/lapack implementation.
6362067
to
193b8c2
Compare
193b8c2
to
7b30310
Compare
OK. so updated the PR to now enable this is basically what the initial PR did (default to openblas for darwin) but after spending some time looking at the derivation made a few updates. |
@ofborg build arpack.passthru.tests arpack |
|
use ninja, cmakeBool and remove unneeded install_name_tool usage in postFixup as the library name is already properly set by the build
The arpack package included the eigen library and added it to the build inputs but neglected to enable its use by setting `EIGEN=ON` in the build flags. Enable support for eigenvalue-problems solver based on ICB and eigen and disable parallel checking as the tests fail when run in parallel.
Copy darwin flags `-ff2c -fno-second-underscore` from workflow to use Accelerate without segfaulting / failing tests and enable the Accelerate framework when `useAccel` is true. https://github.com/opencollab/arpack-ng/blob/804fa3149a0f773064198a8e883bd021832157ca/.github/workflows/jobs.yml#L184-L192
7b30310
to
2f215b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good – is there a reason not to default to Accelerate for Darwin though since apparently it’s what upstream defaults to and tests in CI? (And also maybe the last commit should be squashed into the first one given the different approach?)
I left openblas because it works on linux and that's what this was using before the SDK refactor and we've seen some sketchy Accelerate behavior so it seemed like a safer option. not married to the choice tho |
Builds on aarch64-darwin. |
change 07cdea2 uncovered a misconfiguration in the darwin build resulting in some tests failing / segfaulting. Switch to using openblas which has no issues with the tests. Additionally, enable eigen as it was part of the build inputs but was unused as
EIGEN=ON
was not set in the build flags. Finally, added an option to use Accelerate building with the flags-ff2c -fno-second-underscore
found https://github.com/opencollab/arpack-ng/blob/804fa3149a0f773064198a8e883bd021832157ca/.github/workflows/jobs.yml#L184-L192.FWIW: homebrew also uses openblas. https://github.com/Homebrew/homebrew-core/blob/master/Formula/a/arpack.rb
#357259
https://hydra.nixos.org/build/282505341
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.