Skip to content

Conversation

chmerdon
Copy link
Member

The solve function now relies on TimerOutputs and measures each operator separately, the printing of the statistics can be steered with the new argument timeroutputs (default is true).

@pjaap
Copy link
Member

pjaap commented May 28, 2025

Nice, that was a fast adoption :)
Although the timer object is called to in the README of TimerOutputs, I suggest to rename it to timer or tmr.

chmerdon added 2 commits May 28, 2025 10:47
…ted Example103 and Example205, timer now continues from last state if multiple solve calls with the same SolverCOnfiguration are performed
@chmerdon chmerdon requested a review from pjaap May 28, 2025 10:48
Copy link
Member

@pjaap pjaap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks beautiful, I like it

───────────────────────────────────────────────────────────────────────────────────────────
                                                  Time                    Allocations      
                                         ───────────────────────   ────────────────────────
            Tot / % measured:                 24.8s /  96.2%           2.16GiB /  98.0%    

Section                          ncalls     time    %tot     avg     alloc    %tot      avg
───────────────────────────────────────────────────────────────────────────────────────────
assembly                              2    21.0s   87.8%   10.5s   1.65GiB   78.2%   847MiB
  BilinearOperator (first)            1    12.9s   54.1%   12.9s   1.20GiB   56.6%  1.20GiB
  LinearOperator (first)              1    2.80s   11.7%   2.80s    251MiB   11.6%   251MiB
  HomogeneousData (first)             1    801ms    3.4%   801ms    138MiB    6.4%   138MiB
  CombineDofs (first)                 1    206μs    0.0%   206μs   17.2KiB    0.0%  17.2KiB
  BilinearOperator (penalties)        1    698μs    0.0%   698μs    145KiB    0.0%   145KiB
  LinearOperator (penalties)          1   85.3μs    0.0%  85.3μs   17.2KiB    0.0%  17.2KiB
  HomogeneousData (penalties)         1    171ms    0.7%   171ms   8.96MiB    0.4%  8.96MiB
  CombineDofs (penalties)             1    3.96s   16.6%   3.96s   61.9MiB    2.9%  61.9MiB
  residual vector                     1    285ms    1.2%   285ms   6.54MiB    0.3%  6.54MiB
linear solver                         2    2.91s   12.2%   1.46s    473MiB   21.8%   236MiB
  initialization                      1   36.0ms    0.2%  36.0ms   2.31MiB    0.1%  2.31MiB
  solve! call                         1    2.40s   10.1%   2.40s    443MiB   20.4%   443MiB
  update solution                     2    375ms    1.6%   188ms   25.4MiB    1.2%  12.7MiB
  linear residual computation         1   69.2ms    0.3%  69.2ms   1.71MiB    0.1%  1.71MiB

@pjaap
Copy link
Member

pjaap commented May 30, 2025

I vote for merging. A bit of fine tuning should be done but let's wait for user feedback.

@chmerdon chmerdon merged commit b8ce68a into master May 31, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants