-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
FEAT: Added additional tools for Fortran calling codes #1154
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1154 +/- ##
==========================================
- Coverage 73.76% 66.09% -7.67%
==========================================
Files 370 314 -56
Lines 48983 44980 -4003
Branches 0 19146 +19146
==========================================
- Hits 36133 29731 -6402
+ Misses 12850 12665 -185
- Partials 0 2584 +2584
Continue to review full report at Codecov.
|
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.
Thanks for this contribution. While I eventually expect to be able to generate much of this interface in an automated fashion (Cantera/enhancements#39), that's still in it's early stages, so updates to this interface as it exists now are welcome.
I mostly had a few formatting suggestions. The other thing that I think would be valuable is calling a few of these new functions from the existing Fortran 90 test program (samples/f90/demo.f90
).
The new logger does not exit on an error so the calling code can handle errors itself.
Addressed points raised in the review on pull request. Added calls to new routines in the sample F90 program and cleaned up a few of the routine interfaces to remove deprecated/unused info.
dc6b7f2
to
03cd88d
Compare
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.
Thanks for the updates -- the changes look good to me. I hadn't intended for you to have to update the style of any surrounding code, only what was new in this PR, but thanks for taking on a few of those updates anyway.
I just pushed an update to your branch to add a couple comments to the NoExitLogger.h
header so that it will appear in the documentation and so that it has the usual license statement carried by all Cantera source files.
Two small things, which you can update at your discretion, would be (1) to add yourself to the AUTHORS
file and (2) to update update the email address that's set for Git on your computer to one that is associated with your GitHub account so those commits will be attributed correctly. There are some hopefully helpful instructions here: https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit.
No problem on updates -- I ask the folks I develop with to always leave a file better than they left it, so bringing the whole file up to date is worth the couple of extra seconds it took to find-replace things. I think the tests that failed when I first pushed the latest updates were due to the Fortran test having additional output from the calls to the new functions, and I wasn't comfortable changing the blessed solution without somebody "official" checking it out first. |
Right, I forgot about the changes to the blessed output file. Since the changes are pretty simple (just some additional output lines), I would suggest copying those extra lines from |
Done and pushed! Hopefully the tests will all pass now. |
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.
Thanks! This looks good to me.
This wraps a few additional functions into Fortran that we use in our calling code, and also adds a new feature -- an error logger that does not exit from within Cantera so a calling code can handle errors that arise. Mostly useful for Fortran calling codes that cannot catch exceptions.