Skip to content
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

Building with no BLAS on Mac #7652

Closed
jakirkham opened this issue May 20, 2016 · 16 comments
Closed

Building with no BLAS on Mac #7652

jakirkham opened this issue May 20, 2016 · 16 comments

Comments

@jakirkham
Copy link
Contributor

We are trying to build a copy of NumPy that uses no BLAS at all on several platforms including Mac. The main reason we are doing this is that most BLAS libraries are quite large and the system BLASes (e.g. Accelerate) are unreliable. So, in situations where space and/or time are heavily constrained downloading a pre-built BLAS is simply not an option. However, this doesn't appear to be an option on Mac even when we follow the recommended best practice based on the current logic. What can we do?

cc @pelson

@charris
Copy link
Member

charris commented May 20, 2016

Best ask this on the mailing list. But if you want to build with no BLAS you can do

BLAS=None LAPACK=None ATLAS=None python setup.py build

I don't know if that works correctly with all the build options (wheels, etc.)

@jakirkham
Copy link
Contributor Author

So, that is what we are trying to do now, but it doesn't seem to work. It still picks up Accelerate on Mac.

@charris
Copy link
Member

charris commented May 20, 2016

OK, that would be a bug. OSX is special cased, so that probably needs a fix.

@charris
Copy link
Member

charris commented May 20, 2016

Search for darwin in sys_info.py. The distutils are a mess, it would be nice is someone with a bad case of OCD and great programming skills would come along and fix it up.

@jakirkham
Copy link
Contributor Author

As this is something we are eager to have, we will likely come up with a patch that seems to fix our current issues. Though we can submit a PR and iterate on a proper solution once we can get a working building for our more immediate use case.

@charris
Copy link
Member

charris commented May 20, 2016

The easiest, if hackish, fix might be to add an ACCELERATE=None environment variable.

@jakirkham
Copy link
Contributor Author

Thanks for all of the advice, @charris. We will give that a try and get back to you.

@rgommers
Copy link
Member

This can be taken along or will be fixed when someone (might be me) finally gets around to reworking system_info to respect site.cfg instead of using the first BLAS lib it finds in the hardcoded order.

@mattip
Copy link
Member

mattip commented Aug 18, 2019

Closing as we no longer will pick up Accelerate. Please reopen if I misunderstood or if it is not clear how to achieve the configuration you desire.

@mattip mattip closed this as completed Aug 18, 2019
@jakirkham
Copy link
Contributor Author

@mattip, the request in this issue is not about Accelerate, it's about disabling building NumPy with any BLAS. We just happened to have some peculiar issues with Accelerate specifically. This can be handy for space limited environments (e.g. Heroku) where users may want NumPy for basic array operations, but don't care about any BLAS routines.

@mattip mattip reopened this Aug 19, 2019
@mattip
Copy link
Member

mattip commented Aug 19, 2019

Did the suggestions on setting environment variables or using a setup.cfg fail to work?

@rgommers
Copy link
Member

And, what does this do now?

BLAS=None LAPACK=None ATLAS=None python setup.py build

@jakirkham
Copy link
Contributor Author

It failed previously. Was not aware Accelerate is no longer used. So that seems like a good step in the right direction.

Have not rechecked. Will try to find some time to do that.

@mattip
Copy link
Member

mattip commented May 20, 2020

We also have NPY_BLAS_ORDER="" and NPY_LAPACK_ORDER="" which should ensure no blas is used.

@jakirkham
Copy link
Contributor Author

Ok let's go ahead and close then.

@jakirkham
Copy link
Contributor Author

Thanks all for the work here! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants