<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
The chances of these problems are very slim because almost nobody builds Numpy from source. I usually install it with pip. Pip-installed Numpy on Mac uses Openblas, which is shipped together with the numpy wheels. The official API to check which BLAS is used
by Numpy is numpy.show_config(). However, it gives me false info on my laptop — the openblas libs do not really exist in /usr.local/lib.
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class="">
<div class="">openblas64__info:</div>
</div>
<div class="">
<div class=""> libraries = ['openblas64_', 'openblas64_']</div>
</div>
<div class="">
<div class=""> library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class=""> language = c</div>
</div>
<div class="">
<div class=""> define_macros = [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None)]</div>
</div>
<div class="">
<div class=""> runtime_library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class="">blas_ilp64_opt_info:</div>
</div>
<div class="">
<div class=""> libraries = ['openblas64_', 'openblas64_']</div>
</div>
<div class="">
<div class=""> library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class=""> language = c</div>
</div>
<div class="">
<div class=""> define_macros = [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None)]</div>
</div>
<div class="">
<div class=""> runtime_library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class="">openblas64__lapack_info:</div>
</div>
<div class="">
<div class=""> libraries = ['openblas64_', 'openblas64_']</div>
</div>
<div class="">
<div class=""> library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class=""> language = c</div>
</div>
<div class="">
<div class=""> define_macros = [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None), ('HAVE_LAPACKE', None)]</div>
</div>
<div class="">
<div class=""> runtime_library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class="">lapack_ilp64_opt_info:</div>
</div>
<div class="">
<div class=""> libraries = ['openblas64_', 'openblas64_']</div>
</div>
<div class="">
<div class=""> library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class=""> language = c</div>
</div>
<div class="">
<div class=""> define_macros = [('HAVE_CBLAS', None), ('BLAS_SYMBOL_SUFFIX', '64_'), ('HAVE_BLAS_ILP64', None), ('HAVE_LAPACKE', None)]</div>
</div>
<div class="">
<div class=""> runtime_library_dirs = ['/usr/local/lib']</div>
</div>
<div class="">
<div class="">Supported SIMD extensions in this NumPy install:</div>
</div>
<div class="">
<div class=""> baseline = SSE,SSE2,SSE3</div>
</div>
<div class="">
<div class=""> found = SSSE3,SSE41,POPCNT,SSE42,AVX,F16C,FMA3,AVX2</div>
</div>
<div class="">
<div class=""> not found = AVX512F,AVX512CD,AVX512_KNL,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL</div>
</div>
</blockquote>
<div class="">
<div class=""><br class="">
</div>
<div class="">I think Numpy is actually using the following openblas lib:<br class="">
<div class="">
<div class="">/usr/local/lib/python3.10/site-packages/numpy//.dylibs/libopenblas64_.0.dylib<br class="">
<div><br class="">
</div>
<div>I feel that it would be a big hassle if we want to determine the BLAS that Numpy is using, considering the different ways and platforms Numpy may be installed.</div>
<div><br class="">
</div>
<div>Hong (Mr.)</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Oct 21, 2022, at 4:20 PM, Barry Smith <<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class=""><br class="">
When PETSc is built with petsc4py this brings along, in some way, the BLAS/LAPACK that numpy is using. Yet PETSc is free to bring in its own BLAS/LAPACK libraries.
<br class="">
<br class="">
To be completely proper should we be having configure (when used with petsc4py) determine the BLAS/LAPACK that numpy is using and only using that for PETSc's BLAS/LAPACK needs? If not, why is ok to have both sets hanging around? Jose's new
<a href="https://gitlab.com/petsc/petsc/-/merge_requests/5737" class="">https://gitlab.com/petsc/petsc/-/merge_requests/5737</a> seems to indicate possible problems with having both.</div>
</div>
</blockquote>
<blockquote type="cite" class="">
<div class="">
<div class=""><br class="">
Barry</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>