-
Notifications
You must be signed in to change notification settings - Fork 193
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
Instructions for Windows 10 users MKL / OpenBLAS properly formatted #1966
base: master
Are you sure you want to change the base?
Instructions for Windows 10 users MKL / OpenBLAS properly formatted #1966
Conversation
Instructions given so OpenMP will work on Windows 10 with both MKL and OpenBLAS.
|
||
On Windows, the Pythran configuration file is in: | ||
``[python]/Lib/site-packages/pythran/pythran-win32.cfg`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think convention are to use <python_prefix>
here to make it clear that it needs to be adapted.
README.rst
Outdated
On Windows, the Pythran configuration file is in: | ||
``[python]/Lib/site-packages/pythran/pythran-win32.cfg`` | ||
|
||
How you set this up will depend on if you are using an ``Intel MKL`` linked NumPy/SciPy (such as in the Anaconda3 distribution), or if you're using pip installed NumPy/SciPy (which is linked to ``OpenBLAS``). There are some interesting differences in the setup files for each distribution - note the purpose here is to use the right OpenMP library: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/will depend/depends/
CC=clang-cl.exe | ||
CXX=clang-cl.exe | ||
|
||
In some cases, using ``Intel MKL`` will require a substitute ``cblas.h`` which isn't present with MKL. This is not an elegant solution - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/will require/requires/
Note with the ``OpenBLAS`` package, you need to: ``pip install pythran-openblas`` so the library can be linked properly. | ||
|
||
|
||
Using the LLVM linker (optional): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is more than hacky, we cannot suggest to modify system files here :-) This is worth a configuration entry in the pythran config file though.
I'm curious about the motivation for using lld
here?
Change whatever you feel is appropriate. I did notice on a very large project with OpenBLAS I had to change some settings around to get OpenMP working like this: library_dirs='C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64' So link the standard Windows Visual Studio OpenMP library instead of the LLVM one. Why this works on larger projects (100 lines of code) and not the LLVM one I have no idea. So rather than figure it out, I'd just provide it as an alternative if the first method fails... Someone smarter than me may be able to figure out why, although I imagine most users just want config settings to plug in to get their module built and could care less what happens behind the scenes, as long as it's using OpenMP. |
I found that some random modules in my project were actually loading the
My original instructions only showed how to link |
…`libiomp5md` on MKL and OpenBLAS platforms.
Instructions given so OpenMP will work on Windows 10 with both MKL and OpenBLAS.