chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
267 stars 59 forks source link

Add timers for matrix-free operators #1116

Closed lpsaavedra closed 3 months ago

lpsaavedra commented 3 months ago

Description of the problem

There were timers for the setup of the different components of multigrid, the application of the GMG preconditioner, but the operator timers were missing.

Description of the solution

As a follow up of #1112 , this PR adds timers for each operator and prints relevant information if set mg verbosity = extra verbose as follows:

----------------------
System operator times
----------------------
+------------------------------------------------+------------------+------------+------------------+
| Total wallclock time elapsed                   |     19.45s     3 |     19.47s |     19.48s     6 |
|                                                |                  |                               |
| Section                            | no. calls |   min time  rank |   avg time |   max time  rank |
+------------------------------------------------+------------------+------------+------------------+
| operator::evaluate_non_linear_term |         4 |   0.05946s     3 |   0.07027s |   0.07744s     0 |
| operator::evaluate_residual        |         5 |   0.08911s     0 |   0.09178s |   0.09308s     4 |
| operator::vmult                    |        53 |     1.004s     0 |     1.025s |     1.033s     6 |
+------------------------------------------------+------------------+------------+------------------+
-----------------------
Operator level 0 times
-----------------------

+------------------------------------------------+------------------+------------+------------------+
| Total wallclock time elapsed                   |      19.1s     1 |      19.1s |      19.1s     0 |
|                                                |                  |                               |
| Section                            | no. calls |   min time  rank |   avg time |   max time  rank |
+------------------------------------------------+------------------+------------+------------------+
| operator::compute_inverse_diagonal |         4 |   0.02723s     2 |   0.02774s |   0.02836s     7 |
| operator::evaluate_non_linear_term |         4 | 0.0003811s     3 | 0.0004285s | 0.0004796s     0 |
| operator::get_system_matrix        |         4 |   0.04298s     7 |   0.04391s |   0.04527s     0 |
| operator::vmult                    |       328 |   0.07959s     0 |   0.08443s |   0.08579s     6 |
+------------------------------------------------+------------------+------------+------------------+

Comments