8000 ENH: add user control to check embedded lapack in openblas by zerothi · Pull Request #5855 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: add user control to check embedded lapack in openblas #5855

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

Closed
wants to merge 1 commit into from
Closed

ENH: add user control to check embedded lapack in openblas #5855

wants to merge 1 commit into from

Conversation

zerothi
Copy link
Contributor
@zerothi zerothi commented May 8, 2015

Linking openblas without lapack support can in certain cases
fail due to erronous test. Instead of trying to fix tests
for linking correctly a library we allow the user to control
the build in check.
This can be acheived by adding:
[openblas]
embedded_lapack = True
which then forces lapack to be embedded.

I have added comments in site.cfg.example to explain when and
how it can be used.

Linking openblas without lapack support can in certain cases
fail due to erronous test. Instead of trying to fix tests
for linking correctly a library we allow the user to control
the build in check.
This can be acheived by adding:
  [openblas]
  embedded_lapack = True
which then forces lapack to embedded.

I have added comments in site.cfg.example to explain when and
how it can be used.
@charris
Copy link
Member
charris commented Jun 3, 2015

@juliantaylor Comments?

@rgommers
Copy link
Member

The comments in site.cfg.example are quite long, feels a bit too extensive for something that's basically a workaround for imperfect detection logic.

@rgommers
Copy link
Member

@zerothi could you give a concrete example for how to make this check fail but the build of a package that relies on this passing? That would help with testing this PR. Improving the test would also still be useful, even when we do allow manual control via site.cfg.

@zerothi
Copy link
Contributor Author
zerothi commented Jun 22, 2015

Basically there are two situations:

  1. embedded_lapack = False, or not set in site.cfg.
    Building OpenBLAS with make NO_LAPACK=1 will not embed lapack in the openblas library.
    If this is the case building numpy will fail as it is expected that lapack is embedded.
    I could not circumvent this, even if the lapack library was denoted in the site.cfg.
    Hence:
[openblas]
libraries = lapack,openblas

will fail as it only checks for lapack existence in the openblas library, not in the combined linking path and libraries in the openblas block.

  1. embedded_lapack = True.
    Skips the check for lapack in the openblas library and assumes that the user have supplied the correct library on the linking path. Hence:
[openblas]
libraries = lapack,openblas
embedded_lapack =  True

will succeed and build will assume that lapack can be found on the linking path and supplied libraries.

I was a bit unsure of the wording embedded_lapack, but this was a small abstraction.

@rgommers
Copy link
Member

@charris @juliantaylor this doesn't look too hard to merge and is probably correct, but I won't get around to it before end October. Can one of you look at it?

@zerothi
Copy link
Contributor Author
zerothi commented Sep 17, 2015

Please refer to #6328 for an easier and better work-around for the LAPACK problem.

I will close this PR as it is superfluous and #6328 is much clearer and better.

@zerothi zerothi closed this Sep 17, 2015
@zerothi zerothi deleted the enh-distutils branch September 22, 2015 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0