-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
f2py - f2cmap fails on common blocks in f90 #19161
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 8000 ? Sign in to your account
Comments
Thanks for the report, @2sn - we'll try to look into it as soon as possible. |
I can't seem to reproduce this... @2sn could you confirm if this is still an issue? module data
implicit none
INTEGER, PARAMETER :: real64 = SELECTED_REAL_KIND(15)
real(kind=real64) :: x
common/test/x
end module data Seems to compile alright: > python -c "import numpy as np; print(np.__version__)"
1.23.0.dev0+1087.g0eaa40db3
> python -m numpy.f2py data.f90 -c -m dat
> python -c "import dat; print(dat.test.x)"
0.0 |
I believe I have since been able to work around the issue, but I do not recall what solved the issue. But maybe you also misread my message: I said that the version you have was working but the issue was the version at the top of the message that had the line use typedef, only: real64 instead of INTEGER, PARAMETER :: real64 = SELECTED_REAL_KIND(15) Could you please try that? |
BUG: Handle `common` blocks with `kind` specifications from modules
Reproducing code example:
The code (
data.f90
)fails compile with f2py, whereas without the common block,
it just compiles fine. (Sadly, I require common blocks since I cannot import data from external modules.)
I use a custom
.f2py_f2cmap
fileand I do get affirmative output
It applease some F77 module file is created, but my
use
statement may be ignored.when I directly add the line
instead of
It appears to work.
Would it be possible to have
f2py
not createF77
interface module for.f90
codes even if they use common blocks?(that might resolve it)
Error message:
NumPy/Python version information:
The text was updated successfully, but these errors were encountered: