You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following on from a recent discussion on slack, it would be useful to add some more sections to the manual page on performance. Some possible topics include:
Using Constant or Real instead of float to avoid recompiling kernels every time the value changes.
Setting constant_jacobian=True if the coefficients in a LinearVariationalProblem don't change between solves (or if they don't change every time, and use the invalidate_jacobian() method).
Consider changing to an iterative method instead of the default LU once you scale up past smaller test problems.
Regarding 2. aren't we clever enough to do this automatically if coefficient.dat.dat_version did not change for every coefficient in form.coefficients() since the last time we assembled?
Maybe, but we don't. You also need to look at all the Constants in the form not just the dats. There may well be other things you'd need to check to do it reliably.
Combined with defaulting to LU, having constant_jacobian=False as the default can be a big performance hit so it should be in this manual section.
If we start doing it automagically then we can take that topic out.
Following on from a recent discussion on slack, it would be useful to add some more sections to the manual page on performance. Some possible topics include:
Constant
orReal
instead offloat
to avoid recompiling kernels every time the value changes.constant_jacobian=True
if the coefficients in aLinearVariationalProblem
don't change between solves (or if they don't change every time, and use theinvalidate_jacobian()
method).Where to find
https://www.firedrakeproject.org/optimising.html
Additional info
Flamegraphs of before/after each change would be nice, and adding them to the existing "Calling
solve
repeatedly" section.The text was updated successfully, but these errors were encountered: