dtc/develop: speed up static compilation#277
Conversation
… when no changes are made
…efile/cmakefile/sourcefile snippets if nothing has changed
…in scripts/mkstatic.py
|
@gold2718 I am adding you as a reviewer here, because this change will go to master very soon (right now it goes to dtc/develop). This change is needed to speed up the compilation of the CCPP code. Without it, the auto-generated caps are recompiled every time, even when no change is made. I realize that this solution is only required for a short time before transitioning to |
gold2718
left a comment
There was a problem hiding this comment.
Looks okay. FWIW, I do not have any such logic in capgen. I always felt it was the host model's responsibility to decide whether or not to run capgen. We should talk about this sometime.
Thanks for reviewing. We'll probably need to add this capability (not now). EMC has complained that recompiling CCPP takes too long, and if you make a change in one scheme you don't need to recompile all auto-generated files (but you still need to run |
|
I have a couple of issues with this approach.
|
One could put the burden on the developer to decide/set a flag whether to run I don't see why comparing the caps is specific to the UFS host model build system, it makes sense to not update/rewrite the cap if it hasn't changed. If an underlying module has changed (e.g. I was thinking about checksums as well, but decided that this would be more development work and not worth the effort, given that |
|
Okay, maybe this makes everyone happy:
Sound like a plan? This is easy to implement and may even benefit CESM builds. Currently, we re-run capgen if any metadata file or SDF has changed. However, if the only change is to a variable's long name or a comment, the generated files will not be different. Using both techniques might help. |
llpcarson
left a comment
There was a problem hiding this comment.
looks like a good solution for now - approved
Changes in ccpp-framework:
scripts/mkstatic.py: avoid recreating the auto-generated caps and API when no changes are madeAssociated PRs:
#277
NCAR/ccpp-physics#425
NCAR/fv3atm#35
NCAR/ufs-weather-model#33
For regression testing information, see NCAR/ufs-weather-model#33.