Closed dweindl closed 8 months ago
Attention: Patch coverage is 38.07339%
with 270 lines
in your changes are missing coverage. Please review.
Project coverage is 77.83%. Comparing base (
6a1cc3c
) to head (0022111
).
On second thought, I'll directly include dwd* here as well.
Still something wrong here. The number of nonlinear convergence failures is significantly higher than before this change. :/
Resolved. Was related to other changes.
For a model with nw: 227, nx: 67, ndwdx: 759, ndwdw: 471:
Looks like some further profiling/optimization is required...
For a model with nw: 227, nx: 67, ndwdx: 759, ndwdw: 471:
* determining static expressions add 10 seconds to the previous 5 seconds for full code generation :( * no observable difference in simulations times
Looks like some further profiling/optimization is required...
Okay, for that model, I am now down to no noticeable overhead and would merge those changes. 2.5 seconds overhead.
EDIT: I removed the derivative-based check for dwd* elements. With just checking for whether the expressions contain dynamic symbols, we have minimal overhead (<1s) and probably don't lose much.
Split expressions in
w
and its derivatives into dynamic (explicitly or implicitly time-dependent) and static ones. Evaluate static ones only when needed, i.e. after (re)initializing x_rdata or parameters.See #1269