summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_index_tricks.py
diff options
context:
space:
mode:
authorNick Papior <nickpapior@gmail.com>2019-03-15 14:27:47 +0100
committerNick Papior <nickpapior@gmail.com>2019-03-18 21:27:01 +0100
commited6611d30aad3e898af823f73ddf9a1bad4cbd79 (patch)
treecbc53f950351d5926ead0b64844bd40c68bb0923 /numpy/lib/tests/test_index_tricks.py
parent632afad440193271535a33a89bc3e19c3ecc291c (diff)
downloadnumpy-ed6611d30aad3e898af823f73ddf9a1bad4cbd79.tar.gz
ENH: allowed external users to select BLAS and LAPACK library link order
Prior to this enhancement compiling numpy would forcefully check BLAS/LAPACK libraries in the following order: BLAS: - mkl - blis - openblas - atlas - accelerate - NetLIB BLAS - LAPACK - mkl - openblas - atlas - accelerate - NetLIB LAPACK This is problematic if a user want to build using, say, OpenBLAS but MKL is installed. Even populating the site.cfg correspondingly one would get a successfull build, but using MKL, if present. The same applies to OpenBLAS vs. ATLAS etc. Especially for developers this may be desirable to check performance with various BLAS/LAPACK libraries. This fixes the above issues by enabling users to forcefully set the order of loads via environment variables: $> export NUMPY_BLAS_ORDER=openblas,mkl,atlas $> python setup.py config ... would first try OpenBLAS (if existing), then MKL, and finally ATLAS. In this case the build would fail if neither of OpenBLAS, MKL or ATLAS is present. I.e. this can also be easierly used to test whether a linking would work. This is because specifying a single library forces only one library check and has no fall-back procedure (as requested by the user!). The same applies to: NUMPY_LAPACK_ORDER=openblas,mkl,atlas This has meant that the blas_opt_info and lapack_opt_info classes in system_info.py has *completely* changed. Effectively there is only ONE change: A fall-back of LAPACK was previously using get_info('blas') to get the BLAS library to correctly link LAPACK. However, this may be undesirable when the user has OpenBLAS/BLIS/ATLAS in a BLAS only installation but wants to use the NetLIB LAPACK. Hence now lapack_opt_info uses get_info('blas_opt') which does change the fall-back routine slightly. But perhaps for an easier build? Signed-off-by: Nick Papior <nickpapior@gmail.com>
Diffstat (limited to 'numpy/lib/tests/test_index_tricks.py')
0 files changed, 0 insertions, 0 deletions