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

feat: Timers #235

Merged
merged 10 commits into from
Nov 21, 2024
Merged

feat: Timers #235

merged 10 commits into from
Nov 21, 2024

Conversation

pmatalon
Copy link
Contributor

@pmatalon pmatalon commented Nov 18, 2024

Description

Timers can be activated by the --timers argument.
Main samurai execution steps are timed, and the results are displayed at the end of the program, within the call to samurai::finalize().
Example:

                            Elapsed (s)    Fraction (%)
           ghost update           2.448            30.8
        mesh adaptation           2.419            30.4
    convection operator           1.956            24.6
            data saving           0.802            10.1
      field expressions           0.261             3.3
       ----------------
              (untimed)           0.061             0.8
       ------------------------------------------------
          total runtime           7.946           100.0

Changes in user code

  • samurai now requires cli11.
  • Although the new code is retrocompatible, the user codes that already use cli11 should get the app object from samurai::initialize():
auto& app = samurai::initialize("My app's description", argc, argv);
  • CLI11_PARSE(app, argc, argv) should also be replaced with SAMURAI_PARSE(argc, argv).

Code of Conduct

By submitting this PR, you agree to follow our Code of Conduct

  • I agree to follow this project's Code of Conduct

@pmatalon pmatalon merged commit 7d39d12 into hpc-maths:master Nov 21, 2024
15 checks passed
@pmatalon pmatalon deleted the timers branch November 21, 2024 09:47
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.

1 participant