-
Notifications
You must be signed in to change notification settings - Fork 104
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
Fixed f2py string intent #262
Conversation
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.
This looks good, nice catch. I guess the only way to test this would be to bump numpy version on latest
images?
Yes, we can't test this on Azure without updating the Docker images. I tested this locally using a Docker image, so you can try that to verify the fix. |
Codecov Report
@@ Coverage Diff @@
## main #262 +/- ##
=======================================
Coverage 40.77% 40.77%
=======================================
Files 13 13
Lines 3882 3882
=======================================
Hits 1583 1583
Misses 2299 2299 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Nice
* fixed f2py string intent * update numpy requirement
Purpose
numpy 1.22 introduced some changes to how array dimensions are determined with f2py. From what I can tell,
intent(out)
strings of undetermined length are no longer valid (or have never been valid but did not previously raise an error).ADflow has 4 string variables with
intent(inout)
that cause problems with numpy 1.22. I posted the error message in #256. However, we never use these variables in Python after passing them to Fortran, so I changed them tointent(in)
. This fixes the error and does not change the behavior of the code.Expected time until merged
1 week
Type of change
Testing
I installed numpy 1.22, recompiled ADflow with these changes, and checked that all tests pass.
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable