ds4dm / Tulip.jl

Interior-point solver in pure Julia
Other
154 stars 20 forks source link

Count another location of `KKT.solve!()` call in the final stats (previously unreported). #147

Closed pratyai closed 4 months ago

pratyai commented 4 months ago

Since the KKT.solve!() is typically one of the more expensive parts of a Newton step computation, we should account for the ~20% of calls and runtime that are currently unreported.

mtanneau commented 4 months ago

Thanks @pratyai ! Could you share a screenshot of what the final TimerOutputs displays to after this change please? I'm trying to understand the interplay between the "Newton" and "KKT" tags in the @timeit macros, and how it will interact with the timing report of solve_newton_system! later (which is also tagged as "Newton" in @timeit)

pratyai commented 4 months ago

Previously, at every step, one kkt.solve!() call was under-reported (e.g. in the picture it increases by exactly 12, after I add the @timeit call).

The "KKT" stats are nested inside the "Newton" stats, which is why I had to do the nesting with @timeit macro, so that it doesn't get reported separately (although perhaps it should be).

Before

Screenshot 2024-06-07 at 16 06 01

After

Screenshot 2024-06-07 at 16 04 02