I'm looking to do some work with NumPy on my Raspberry Pi 3 B+, which uses a ARM 4-core Cortex-A53 (ARMv8) 64-bit (SEE EDIT AT BOTTOM), and I'm not sure what the deal is with parallel optimization, blas, etc. Before installing NumPy (python 3), I installed lapack and atlas using
sudo apt-get install liblapack-dev
sudo apt-get install libatlas-base-dev
Following which I installed Numpy (using pip3). Checking how NumPy is setup using the following code:
import numpy as np
print (np.__config__.show())
Outputs:
openblas_info:
NOT AVAILABLE
lapack_opt_info:
library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
language = f77
define_macros = [('ATLAS_INFO', '"\\"3.10.3\\""')]
libraries = ['lapack', 'f77blas', 'cblas', 'atlas', 'f77blas', 'cblas']
include_dirs = ['/usr/include/atlas']
openblas_lapack_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
atlas_3_10_threads_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
atlas_info:
library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']
language = f77
define_macros = [('ATLAS_INFO', '"\\"3.10.3\\""')]
libraries = ['lapack', 'f77blas', 'cblas', 'atlas', 'f77blas', 'cblas']
include_dirs = ['/usr/include/atlas']
lapack_mkl_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
NOT AVAILABLE
openblas_clapack_info:
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_blas_threads_info:
NOT AVAILABLE
atlas_3_10_blas_info:
NOT AVAILABLE
blas_opt_info:
language = c
library_dirs = ['/usr/lib/atlas-base']
define_macros = [('HAVE_CBLAS', None), ('ATLAS_INFO', '"\\"3.10.3\\""')]
libraries = ['f77blas', 'cblas', 'atlas', 'f77blas', 'cblas']
include_dirs = ['/usr/include/atlas']
atlas_threads_info:
NOT AVAILABLE
atlas_blas_info:
language = c
library_dirs = ['/usr/lib/atlas-base']
define_macros = [('HAVE_CBLAS', None), ('ATLAS_INFO', '"\\"3.10.3\\""')]
libraries = ['f77blas', 'cblas', 'atlas', 'f77blas', 'cblas']
include_dirs = ['/usr/include/atlas']
atlas_3_10_info:
NOT AVAILABLE
None
On an Intel/AMD machine, which has mkl/lapack, the info for every library has "pthread" included, which I know is for low level multi-threading on c. None of the libraries from numpy on my blas contain "pthread".
When I run a test where I multiply big matrices using NumPy, upon using the "top" command to view processes/resources, the python process never goes about 100% cpu usage. It would hit ~400% were I using 4 cores.
Is there any sort of ARM-based solution to allow numpy to perform parallel computing?
Thanks!
EDIT:
For what it's worth, apparently Raspbian uses 32 bit armv7L even though the processor can run armv8. There are other 64 bit os's that you can put on a pi.