question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide an easy way to check BLAS/LAPACK linkage from python

See original GitHub issue

According to the answers to this stackoverflow question the only way to check if Numpy is using the system BLAS/LAPACK is to inspect the output of ldd on some library belonging to numpy hidden deep in the filesystem. In fact I am not 100 % sure that I interprete my results correctly.

It would be nice with something like

>>>print(numpy._lapack_version_)
3.4.2

>>>print(numpy._blas_version_)
OpenBLAS 0.2.8

or if we are using the fallback

>>>print(numpy._lapack_version_)
fallback

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:2
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

8reactions
charriscommented, Oct 13, 2013

You can get some information from np.__config__.

In [5]: np.__config__.show()
atlas_threads_info:
    libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
    language = f77
    include_dirs = ['/usr/include']
blas_opt_info:
    libraries = ['ptf77blas', 'ptcblas', 'atlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
    language = c
    include_dirs = ['/usr/include']
atlas_blas_threads_info:
    libraries = ['ptf77blas', 'ptcblas', 'atlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
    language = c
    include_dirs = ['/usr/include']
openblas_info:
  NOT AVAILABLE
lapack_opt_info:
    libraries = ['lapack', 'ptf77blas', 'ptcblas', 'atlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('ATLAS_INFO', '"\\"3.8.4\\""')]
    language = f77
    include_dirs = ['/usr/include']
lapack_mkl_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
mkl_info:
  NOT AVAILABLE
1reaction
dhimmelcommented, Apr 6, 2018

numpy.show_config() provides the same results as numpy.__config__.show(), but perhaps is a more intended use of the numpy API.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to check BLAS/LAPACK linkage in NumPy and SciPy?
The method numpy.show_config() (or numpy.__config__.show() ) outputs information about linkage gathered at build time.
Read more >
How to check BLAS/LAPACK linkage in NumPy and SciPy?
PYTHON : How to check BLAS / LAPACK linkage in NumPy and SciPy? [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] ...
Read more >
LAPACK for Windows - ICL UTK
Download the BLAS, LAPACK and LAPACKE dll. · Link your C application built with MSVC with the BLAS,LAPACK and LAPACKE libraries (the lib...
Read more >
Building from source — NumPy v1.23 Manual
One relatively simple and reliable way to check for the compiler used to build a library is to use ldd on the library....
Read more >
Low-level BLAS functions (scipy.linalg.blas)
Return available BLAS function objects from names. find_best_blas_type ([arrays, dtype]). Find best-matching BLAS/LAPACK type.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found