-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
f2py and OpenMP linking #11908
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
We don't currently have any maintainers dedicated to f2py. If you or someone else would like to work on this we would welcome a PR. |
I usually do this for gfortran |
Isn't this solved since numpy-1.16.0 and defining: |
Yup it does look like it, would be fantastic to have a docs PR close this :) |
Should be fixed (replaced / deprecated) by #24532. |
When building an extension module with f2py from numpy as late as 1.15.1, the link command fails to include the OpenMP compiler flag (gfortran: -fopenmp, ifort: -qopenmp, etc.). Therefore, the extension module is not linked against the required Offloading and Multi Processing Runtime Library and possibly other dependent libraries which vary by compiler.
While there may be another method of specifying the appropriate linker option (which I would be interested in knowing), it would appear that this option should be passed to the linker as part of the linker_so options or equivalent.
Note that, at least with gfortran and ifort, a compiler command line option instructs the linker to include the Offloading and Multi Processing Runtime Library (which is dependent on the compiler used). Therefore, adding the library(s) in a generic way that supports multiple Fortran compilers in a build environment prevents the explicit listing of these libraries when invoking f2py.
Numpy/Python version information: 1.15.1
The text was updated successfully, but these errors were encountered: