3
votes

I am trying to install scikit-learn so that it doesn't have access to ATLAS (other BLAS and LAPACK libraries okay). Is there is a way to set the install so that ATLAS isn't used? Sorry for the basic question but I couldn't see a good way of doing it.

The reason I want to do this: I'm working on a cluster where I can't build atlas, but the pre-installed version of it is broken (compiled on 16 cores, only 8 cores on node, pthread problems), so when I install scikit-learn my scikit-learn tries to fire up these libraries and I get errors.

Thanks

EDIT: It seems I had some things wrong, and actually scipy is still broken after I compile it against openblas. In one of the unit tests I'm getting:

assertion !pthread_create(&thr->thrH, &attr, rout, arg) failed, line 111 of file /var/tmp/portage/sci-libs/atlas-3.10.1-r2/work/ATLAS//src/threads/ATL_thread_start.c

Bit of a longshot now, but any idea why my scipy build is even looking at ATLAS?

1
I think numpy uses BLAS/LAPACK too. You should check if your numpy is linked against ATLAS or not.ysakamoto
Thanks, I have. I have built Numpy and Scipy without ATLAS I believe. Code that was failing just on a numpy import is now running fine. This was done using "BLAS=<mylocalinstall> LAPACK=<mylocalinstall> ATLAS=NONE setup.py install"GeorgeWilson

1 Answers

2
votes

Numpy, scipy and scikit-learn will all try to link to ATLAS if they find it. While scikit-learn can build against its own embedded subset of BLAS if no ATLAS or other BLAS/LAPACK is found on the system, scipy will require a BLAS/LAPACK implementation anyway.

What you could do is build your own versions of numpy, scipy and scikit-learn against a locally built of either ATLAS or OpenBLAS (take the master branch on github for the latter).

To do so you need to customize the site.cfg file in the numpy and scipy source folders prior to building.

Also you should build OpenBLAS with something like:

make TARGET=NEHALEM NO_AFFINITY=1 NUM_THREADS=8 USE_OPENMP=0