STEllAR-GROUP / octotiger

Astrophysics program simulating the evolution of star systems based on the fast multipole method on adaptive Octrees
http://octotiger.stellar-group.org/
Boost Software License 1.0
48 stars 18 forks source link

Exact meaning of the reported time. #444

Closed JiakunYan closed 8 months ago

JiakunYan commented 1 year ago

Octo-Tiger always reports the results of three timers at the end of the execution. For example,

 Total: 11.4
 Computation: 9.70289 (85.113 %)
 Regrid: 3.1547 (27.6728 %)
 Computation + Regrid: 12.8576 (112.786 %)

The computation time + regrid time is usually greater than the total time. At first, I thought this shows how much time overlap we achieved. However, after examining the code, I found the regrid timer will always record the time of one more regrid function call than the total timer. (https://github.com/STEllAR-GROUP/octotiger/blob/50f1325e812e6a73004fde4ed40bedab0d606793/src/node_server_actions_3.cpp#L342).

Is this the intended behavior? What does the "Computation + Regrid:" line want to show exactly?

diehlpk commented 1 year ago

@dmarce1 can you please explain this?

diehlpk commented 1 year ago

@dmarce1 can you please explain this?

diehlpk commented 1 year ago

@dmarce1 or @G-071 can you please explain this?

dmarce1 commented 9 months ago

This is a bug. It is because time_total and time_regrid are called from functions that do not execute in parallel, while time_computation is called from functions that do. I will figure out a fix for it.