-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: numpy 1.26.4 does not find MKL at runtime #26435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've explicitly tried to exclude
but it still builds and links against |
Update: I realized that I was testing a different build of numpy than I was building. However, for the life of me I can't figure out how to install into a specific folder with |
Not sure how to install into a specific directory, but you can use
|
I use
This will build a new install of
|
@ngoldbaum Let's say I've already built numpy with |
If you are providing a package for multiple people, then you should be producing a wheel and publishing that wheel for them to install |
You can pass arguments to meson from a
|
You have the wrong idea. This is a high performance computing system. I want multiple users on the same machine to use this from a single location, and I don't want t 8000 hat location to be my home directory where I build stuff. I certainly don't want them to install wheels individually. I've built hundreds of packages on *nix systems, and most allow specification of a "prefix" in which to install binaries, libraries, headers, documentation, etc. I should be able to do this for python packages as well, or there's something broken about how python thinks packages should be managed. |
I don't think that is possible. Once there is a This part of the
shows that the
It probably doesn't matter here, but if you still have problems after removing the other numpy/.github/workflows/linux_blas.yml Line 278 in fba4fc1
|
This is perfectly fine, that is a supported and important use case. I think though that it has to be set up in a way that users cannot install other Python packages themselves with something like the |
Ah you figured this out already. Then to go on to the actual use case:
For MKL: do you want to link to a central MKL install, either in say If you want the |
@rgommers Thanks for commenting and explaining, and I apologize for my meandering bugfixing method. As you correctly surmised, I have since figured out that my initial complain of not finding MKL at runtime was because I was loading the wrong numpy, i.e., not the numpy that had successfully compiled against MKL. This in turn was because I was expecting
I cannot tell you how many hours I've spent hunting down these supposedly helpful meson log files that don't exist. I've also found that Anyway, my current situation is
|
This is an annoying problem indeed, but it's easy to resolve: add
Indeed, it is not. I suggest to change your build command to (first line is unchanged):
(I don't think the That should be all. In case it builds fine but doesn't work at runtime because an MKL |
@rgommers I tried your
This failed with the error
However, the error about
On the other hand, |
They're probably not needed, but I want things to fail if MKL is not found instead of silently using openblas. |
That is very strange. I don't know what is going on there, I've never seen that before. The build log also shows
It will. Using
|
So, the
which successfully compiled numpy and installed it in the same folder tree/prefix when my python binary is located. Yay, thanks @rgommers! I'm OK closing this ticket unless you want otherwise. |
Great, thanks @AgilentGCMS. Yes, let's close it, since things work for you now. If you have problems again with BLAS/MKL/Meson, please feel free to ping me directly on a new issue. |
Describe the issue:
I recently installed
numpy 1.26.4
from source on a machine that has intel oneapi compilers (icx/icpx) and MKL libraries. I installed withand during compilation, it told me that it had found the correct shared library,
And yet, at runtime it seems to be using
openblas
and not MKL.Reproduce the code example:
Error message:
No response
Python and NumPy Versions:
Runtime Environment:
[{'numpy_version': '1.26.4',
'python': '3.11.9 (main, Apr 4 2024, 11:00:55) [Clang 14.0.0 (icx '
'2022.1.0.20220316)]',
'uname': uname_result(system='Linux', node='gs6101-trident.ndc.nasa.gov', release='4.18.0-513.24.1.el8_9.x86_64', version='#1 SMP Thu Mar 14 14:20:09 EDT 2024', machine='x86_64')},
{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX'],
'not_found': ['AVX512_KNL',
'AVX512_KNM',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL']}},
{'architecture': 'SkylakeX',
'filepath': '/home/sbasu1/packages/lib/python3.11/site-packages/numpy.libs/libopenblas64_p-r0-0cf96a72.3.23.dev.so',
'internal_api': 'openblas',
'num_threads': 8,
'prefix': 'libopenblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.23.dev'}]
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: