ccpp_prebuild.py: speed up recompiling unchanged code (again)#357
Merged
climbfuji merged 1 commit intoMar 31, 2021
Merged
Conversation
…ists where needed to avoid differences in the auto-generated code when recompiling the same code
gold2718
approved these changes
Mar 26, 2021
Collaborator
gold2718
left a comment
There was a problem hiding this comment.
I'm not sure why the output should have changed if the symbol names did not (I thought they came out in dictionary sort order) but I don't see anything wrong with these changes.
Collaborator
Author
Thanks for the quick review. Yes, at this point I don't want to spend too much time investigating a spurious problem that I can fix by simply replacing all |
This was referenced Mar 27, 2021
XiaSun-Atmos
approved these changes
Mar 30, 2021
22 tasks
grantfirl
approved these changes
Mar 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue that has come up just recently due to unrelated build changes in the UFS. When recompiling the same, unchanged code, the auto-generated caps as well as the cmake include files can change and trigger a full recompile. While it is beyond my understanding why this didn't happen before, the solution is to make the framework more robust against such external changes:
Replace regular Python dictionaries with ordered dictionaries, sort lists where needed to avoid differences in the auto-generated code when recompiling the same code. Also: sanitize formatting in a few places. No code/answer changes.
Associated PRs:
#357
NCAR/ccpp-physics#600
NOAA-EMC/ufsatm#267
ufs-community/ufs-weather-model#498
For regression testing, see ufs-community/ufs-weather-model#498