Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up nonsparse AD initial setup significantly #16089

Closed
wants to merge 2 commits into from

Commits on Nov 5, 2020

  1. Speed up nonsparse AD initial setup significantly

    We have been setting `ADReal::do_derivatives=true` by default and only
    toggling to `false` during residual computation. This can be very bad
    for non-sparse calculations. For instance in a navier-stokes input file
    supplied by Gavin Ridley, I saw 10 seconds spent in initial condition
    computation and 9 seconds in `ComputeMaterialsObjectThread` for a total
    of 19 seconds in `FEProblemBase::initialSetup`. This was 27% of the
    total computation time! With the changes here
    `FEProblemBase::initialSetup` no longer even appears in the graph, which
    is how it should be.
    
    I recall that I was forced to do derivative calculations by default for
    the reasons stated in the comment I'm deleting. My memory says some
    phase field object was initializing its material properties in its
    constructor, or more likely during `initialSetup`, so we had to enable
    derivative calculations then or else its results would be garbage.
    Hopefully, however, if there are objects still doing things like that we
    can do a little more fine-grained control to make their objects work
    without significantly sabotaging everyone's performance.
    
    Refs idaholab#14701
    lindsayad committed Nov 5, 2020
    Configuration menu
    Copy the full SHA
    db42526 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed82e42 View commit details
    Browse the repository at this point in the history