-
Notifications
You must be signed in to change notification settings - Fork 65
Bug fixes for ccpp_prebuild to work with partially case-insensitive capgen parser #669
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
Bug fixes for ccpp_prebuild to work with partially case-insensitive capgen parser #669
Conversation
|
@climbfuji I can't test this since #668 is not working in the UFS :(. |
mwaxmonsky
left a comment
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.
Just a few design/python questions.
gold2718
left a comment
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.
Mostly okay, just a minor Fortran nit.
This is the whole point of this PR. Use #668 as a base and pull in the changes from here (#669). |
…r-to-lowercase conversion
Facepalm |
|
@dustinswales I found an interesting problem with the capgen / prebuild updates. We need to look at how the CCPP_interstitial DDTs are allocated. The implementation in NEPTUNE at least still relies in parts on the old blocked data structures, and this breaks when more than one thread is used, now that |
@climbfuji That's interesting. Not sure if I understand the details completely. I'm stuck on something else.... I (think) I got through all of the metadata changes I needed, but I'm running into a new error when building: I think this has something to do with case sensitivity, but I haven't figured out all the details yet. |
You need to update the calling CMakeLists.txt that includes ccpp-framework to build a static library. I am doing this in NEPTUNE: I think this is safe for the UFS, too. But if you have something else setting this variable higher up, then you need this: |
|
Another update. I got the UFS code to run with the updated GFS_interstitial DDT, it is b4b between omp=1 and omp=2. I still need to check on memory footprint and performance, but at least I have a working solution now that the capgen parser refuses |
Good news is that so far, no further changes required to ccpp-framework (i.e. this PR). |
|
@climbfuji Would it make sense to change the frameworks' option(CCPP_BUILD_SHARED_LIBS "Build using shared libraries" ON)
set(BUILD_SHARED_LIBS ${CCPP_BUILD_SHARED_LIBS})Then in the parent level CMake, we can do: set(CCPP_BUILD_SHARED_LIBS OFF) # Or comment out if default for the framework is fine
add_subdirectory(ccpp-framework)If I understand CMake, this way there shouldn't be a need to save the parent projects environment variable. |
It's no problem at all to make the code work with the current name. I think it is actually better to not prefix every variable with HDF5 for example is also not prefixing every CMake variable with |
mkavulich
left a comment
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.
@climbfuji I'll be on PTO until next Tuesday, so once Dustin gives his approval feel free to merge this yourself if I'm not back yet.
|
@dustinswales I feel like we should merge this given that all but one of your UFS tests pass with b4b identical results and that the one remaining test may differ because of a compiler optimization or something else UFS-related. Not merging this PR is holding back the update of main from develop, which in turn holds back updating NEPTUNE and other models. If really needed, we can always apply another bug fix to the |
|
@climbfuji Merging this in is fine with me. |
Can you remind us again what "failing" means (we didn't quite remember yesterday in the meeting). Is it that the tests are b4b different? If so, for release builds only, or also for debug builds? Or is the code crashing? |
|
@climbfuji The RRTMGP test is not b4b, release build only no debug test for GP. |
Ok, I recall suggesting last week to run the RRTMGP test in DEBUG mode for the current develop branch and for your up-to-date branch. If the results match between the two, then I think you can be fairly certain that this is because of the compiler optimization. |
|
And I am very certain that the changes here that deal with case-sensitivity / case-insensitivity) have nothing to do with the RRTMGP b4b differences ... |
I'm looking into this now. |
This is true. |
Oh wow. Can you diff the auto-generated files? Probably have to convert everything to lowercase using |
|
|
@climbfuji I diff'd the Caps and the only change was from 1:IM -> ixs:ixe. |
@climbfuji Differences occur in DEBUG mode. Snap. |
For all phases except the for the different |
Yeah, I've checked all of these things w.o any success. |
|
Then I suggest merging and continuing the investigation with the (soon) updated PR #668 |
Bug fixes for ccpp_prebuild to work with partially case-insensitive capgen parser
These updates are needed to make
ccpp_prebuild.pywork with the recent, partially complete case-insensitivecapgenparser. I tested this with NEPTUNE in a rather complicated way - pulling develop into the branch neptune uses (that is based on main), then creating the bug fixes there, then cherry-picking them so that we can merge them into develop here. Hopefully, by the time this comes all back to NEPTUNE it will still work :-)This PR needs to be merged into develop, then #668 must be updated before it can be merged into main.
User interface changes?: no - but prebuild is now case-insensitive
Fixes: no separate issue created, see discussion in #668
Testing:
test removed: none
unit tests: all pass
system tests: all pass
manual testing: full regression testing with NEPTUNE underway; would like to see UFS testing, too (@dustinswales?)