I'm trying to parallelize some Python code that uses NumPy extensively with the Python multiprocessing package. Unfortunately, as noted here, the default linear algebra libraries provided by Apple (Accelerate/Veclib) cannot be run in parallel. So I'm trying to link an alternate LAPACK/BLAS when installing NumPy, in the hopes that my code can then be parallelized without crashes!
I downloaded and compiled an alternative LAPACK/BLAS. Then, following instructions here, I did:
export LAPACK=/usr/local/Cellar/lapack/3.4.2/lib/liblapack.dylib
export BLAS=/usr/local/Cellar/lapack/3.4.2/lib/libblas.dylib
export ATLAS=None
pip install numpy
which ran fine. However, if I run
numpy.show_config()
in Python, I get
atlas_threads_info:
NOT AVAILABLE
blas_opt_info:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
define_macros = [('NO_ATLAS_INFO', 3)]
atlas_blas_threads_info:
NOT AVAILABLE
openblas_info:
NOT AVAILABLE
lapack_opt_info:
extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
extra_compile_args = ['-msse3']
define_macros = [('NO_ATLAS_INFO', 3)]
atlas_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
atlas_blas_info:
NOT AVAILABLE
mkl_info:
NOT AVAILABLE
indicating NumPy is still using Apple's LAPACK/BLAS! And indeed crashes still abound. Could anyone help me?