Performance Optimizations#1540
Conversation
… allow multithreading
…reated patch level fine-root fraction scratch space as well
…ation, better argument declarations
|
Have you experimented much with |
|
Also, not really an issue but might warrant a second thought: Again this isn't necessarily an issue - i just think it's worth pointing out |
Description:
This branch contains a litany of performance enhancements to FATES. I may try to break these changes into chunks, but it might not be worth it. With a full FATES run at a single site with 9 patches and ~250 cohorts, speed-ups are about the following:
*dual-loop energy balancing is a host-side change that will work with these changes. It reduces the total calls to photosynthesis to achieve temperature convergence in CanopyFluxesMod.
This PR is should be coupled with, or precede: E3SM-Project/E3SM#8143
These changes can be described in several categories:
Note:
This work made use of conversations with AI bots, such as gemini and claude (via Kiro). No suggestions were applied directly by the AIs. Blocks of code and vignettes were copied over, but in small sections and were evaluated each in entirety.
Collaborators:
@cdkoven @rosiealice @bishtgautam @peterdschwartz @mpaiao @glemieux @samsrabin
Expectation of Answer Changes:
This work used "do_b4b" logical flags. When these flags are set to true, changes are expected at the roundoff level for all FATES configurations. When these flags are set to false, there are non round-off level changes that are still appropriate. For instance, we don't need to update the growth and home temperatures for leaf temperature acclimation every 30 minutes, its excessive. This can be done once per day, since these are at least 30 day averages. But changing this value will subtly change results. Thus the do_b4b flag.
*Note: Aside from mentioned above. I found FATES can potentially generate chaotic behavior. For instance, when converting Q10 equations to use the exponential function instead of the power function, difference in the math outcome should be incredibly small (e-15). However these differences generated non-trivial differences in results. I'm intending to investigate this more and compare differences from the math alternatives against perturbations of initial conditions.
Checklist
If this is your first time contributing, please read the CONTRIBUTING document.
All checklist items must be checked to enable merging this pull request:
Contributor
WIP, NOT YET
Integrator
If satellite phenology regressions are not b4b, please hold merge and notify the FATES development team.
Documentation
Test Results:
CTSM (or) E3SM (specify which) test hash-tag:
CTSM (or) E3SM (specify which) baseline hash-tag:
FATES baseline hash-tag:
Test Output: