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

Refactor timing routines #254

Merged
merged 19 commits into from
Mar 7, 2022
Merged

Conversation

conradtchan
Copy link
Collaborator

Type of PR:
modification to existing code

Description:
Makes the timing hierarchy clearer using a tree diagram. E.g.

                    wall        cpu  cpu/wall     frac
 ├─step        :   1.69s      7.15s     4.24   100.00%
 │ ├─tree      :   0.28s      0.39s     1.40    16.67%
 │ │ └─balance :   0.16s      0.04s     0.26     9.26%
 │ ├─density   :   0.66s      1.18s     1.81    38.89%
 │ ├─force     :   0.59s      1.54s     2.60    35.19%
 │ └─extf      :   0.12s      0.24s     1.91     7.41%
 ├─write_ev    :
 └─write_dump  :

This change makes it easier to perform and visualise detailed timing of communication routines.

  • A timer for MPI balancing in tree building has been added to provide an example of multiple nested timers
  • Tree diagram is generated automatically using the hierarchy defined in setup_timers
  • All timers are stored in an array of timers in one place, rather than scattered across the code

Testing:
Examined printout from running a simple disc problem with MPI

Did you run the bots? yes

@conradtchan conradtchan requested a review from dliptai March 4, 2022 00:00
@conradtchan conradtchan marked this pull request as draft March 4, 2022 01:10
@danieljprice
Copy link
Owner

all looks good from my side, feel free to merge :)

@conradtchan conradtchan marked this pull request as ready for review March 7, 2022 10:58
@conradtchan conradtchan merged commit a09aa07 into danieljprice:master Mar 7, 2022
@conradtchan conradtchan deleted the mpi-timers branch March 7, 2022 11:00
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