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

Fix timings for SemidiscretizationCoupled #1978

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

efaulhaber
Copy link
Member

The rhs! calls were counted as "copy to coupled boundaries", producing this weird timer output:

 Section                          ncalls     time    %tot     avg     alloc    %tot      avg
 ───────────────────────────────────────────────────────────────────────────────────────────
 copy to coupled boundaries        7.20k    4.72s   81.7%   656μs   3.31GiB   96.2%   481KiB
   ~copy to coupled boundaries~    7.20k    4.33s   74.9%   601μs   3.31GiB   96.2%   481KiB
   rhs!                            21.6k    395ms    6.8%  18.3μs   5.14KiB    0.0%    0.24B
     volume integral               21.6k    209ms    3.6%  9.65μs     0.00B    0.0%    0.00B
     interface flux                21.6k   62.8ms    1.1%  2.91μs     0.00B    0.0%    0.00B
     surface integral              21.6k   46.5ms    0.8%  2.15μs     0.00B    0.0%    0.00B
     boundary flux                 21.6k   32.6ms    0.6%  1.51μs     0.00B    0.0%    0.00B
     Jacobian                      21.6k   21.3ms    0.4%   985ns     0.00B    0.0%    0.00B
     reset ∂u/∂t                   21.6k   12.9ms    0.2%   597ns     0.00B    0.0%    0.00B
     ~rhs!~                        21.6k   10.1ms    0.2%   467ns   5.14KiB    0.0%    0.24B
     source terms                  21.6k    247μs    0.0%  11.4ns     0.00B    0.0%    0.00B

The new output looks like this:

 Section                      ncalls     time    %tot     avg     alloc    %tot      avg
 ───────────────────────────────────────────────────────────────────────────────────────
 copy to coupled boundaries    3.60k    4.01s   88.3%  1.11ms   3.28GiB   99.3%   956KiB
 rhs!                          21.6k    388ms    8.5%  18.0μs   5.14KiB    0.0%    0.24B
   volume integral             21.6k    207ms    4.6%  9.58μs     0.00B    0.0%    0.00B
   interface flux              21.6k   61.0ms    1.3%  2.82μs     0.00B    0.0%    0.00B
   surface integral            21.6k   46.3ms    1.0%  2.14μs     0.00B    0.0%    0.00B
   boundary flux               21.6k   31.6ms    0.7%  1.46μs     0.00B    0.0%    0.00B
   Jacobian                    21.6k   21.1ms    0.5%   976ns     0.00B    0.0%    0.00B
   reset ∂u/∂t                 21.6k   11.6ms    0.3%   536ns     0.00B    0.0%    0.00B
   ~rhs!~                      21.6k   9.07ms    0.2%   420ns   5.14KiB    0.0%    0.24B
   source terms                21.6k    254μs    0.0%  11.8ns     0.00B    0.0%    0.00B

@efaulhaber efaulhaber requested a review from SimonCan June 13, 2024 16:03
Copy link
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@efaulhaber efaulhaber added the bug Something isn't working label Jun 13, 2024
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.14%. Comparing base (c090422) to head (a3d3cf5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1978      +/-   ##
==========================================
- Coverage   96.14%   96.14%   -0.00%     
==========================================
  Files         460      460              
  Lines       36926    36925       -1     
==========================================
- Hits        35499    35498       -1     
  Misses       1427     1427              
Flag Coverage Δ
unittests 96.14% <100.00%> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@SimonCan SimonCan left a comment

Choose a reason for hiding this comment

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

Look good. Should be ready to be merged.

@ranocha ranocha merged commit 961f64b into trixi-framework:main Jun 14, 2024
35 of 36 checks passed
@efaulhaber efaulhaber deleted the coupling-timers branch June 18, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants