-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
numpy: make numpy find openblas from Homebrew #29056
Comments
Commit: |
Author: Markus Wageringel |
comment:1
In order to test this, one currently needs to force-link Homebrew's readline to
as openblas is keg-only. New commits:
|
Branch: u/gh-mwageringel/29056 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
won't you be getting |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
Replying to @dimpase:
Is pkg-config not always present, possibly by installing the pkgconf spkg? In any case, I changed the relevant line to account for the possibility of an empty dictionary: - if 'openblas' in pc_blas['libraries']:
+ if 'openblas' in pc_blas.get('libraries', []): I have tested this on 9.1.beta1 both using openblas from Homebrew and from Sage and in each case both numpy and scipy find the correct openblas. |
comment:6
could this be made dependent on #29051 ? |
comment:7
Of course. Let us postpone this then. |
Dependencies: #29051 |
comment:8
perhaps MacOS with pkg-config and openblas may be handled the same way as the "generic" systems by this script. |
comment:9
Replying to @dimpase:
You mean by removing the Darwin if-case? I tried that first, but for some reason it did not work, possibly because Numpy has the preference: OpenBLAS > Accelerate > BLAS/LAPACK. This preference can be changed using the variables |
Changed branch from u/gh-mwageringel/29056 to u/mkoeppe/29056 |
Reviewer: Matthias Koeppe |
comment:12
I've merged in the tickets mentioned above and tested using New commits:
|
comment:14
Thank you. |
Changed branch from u/mkoeppe/29056 to |
For numpy to find Homebrew's openblas on macOS, this ticket adds an
[openblas]
section to numpy's site.cfg if Sage is using openblas. This is also what Homebrew's numpy formula does. See also the upstream site.cfg.example.Before this ticket, numpy would use the macOS Accelerate framework instead of openblas, as can be seen from the logs:
After:
This problem was previously discussed on sage-devel.
Depends on #29051
Depends on #29071
Depends on #29084
CC: @dimpase @mkoeppe
Component: packages: standard
Keywords: numpy, scipy
Author: Markus Wageringel
Branch/Commit:
eed1d19
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/29056
The text was updated successfully, but these errors were encountered: