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

[SofaGeneralAnimationLoop] MechanicalMatrixMapper timers #2362

Merged

Conversation

alxbilger
Copy link
Contributor

This is the first PR of a series which the goal is to improve the performances of the MechanicalMatrixMapper.
This PR is based on #2361.

In this PR, manual timers + log are replaced in favor of AdvancedTimers.

This PR serves also as a reference to compare the improvements of the next pull requests. Here are the timings for the MechanicalMatrixMapper.pyscn scene for 1000 time steps measured on my computer:

 LEVEL   START    NUM      MIN     MAX   MEAN     DEV    TOTAL  PERCENT ID
   0       0    1000      74.24  112.80   77.26    2.76 77260.7  100    TOTAL
...
   4       0.80    1      41.79   62.15   44.22    1.53   44.22   57.23 ....MBKBuild
   5       0.99    1      40.91   61.06   43.32    1.47   43.32   56.07 .....MMM-addKToMatrix
   6       0.99    1       1.69    3.69    1.89    0.17    1.89    2.45 ......jacobian
   6       2.88    1       6.29    9.88    6.85    0.34    6.85    8.86 ......stiffness
   6       9.73    1      16.17   23.13   16.55    0.50   16.55   21.42 ......compressStiffnessMatrix
   6      26.28    1       2.74    4.50    2.98    0.16    2.98    3.86 ......copyKToEigen
   6      29.26    1       0.24    0.54    0.28    0.02    0.28    0.36 ......copyJ1J2ToEigen
   7      29.48    1       0.05    0.14    0.06    0.01    0.06    0.08 .......copyJ2ToEigen
   6      29.54    1       9.06   18.67   10.47    0.75   10.47   13.55 ......Multiplication
   7      29.54    1       4.59    9.56    5.44    0.36    5.44    7.04 .......J1tKJ1
   7      34.98    1       0.76    2.15    0.88    0.11    0.88    1.14 .......J2tKJ2
   7      35.86    1       2.73    5.90    3.28    0.35    3.28    4.24 .......J1tKJ2
   7      39.14    1       0.77    1.77    0.86    0.10    0.86    1.12 .......J2tKJ1
   6      40.01    1       2.62    4.70    2.78    0.19    2.78    3.59 ......J1tKJ1-copy
   6      42.79    1       0       0       0       0       0       0    ......J2tKJ2-copy
   6      42.79    1       0.01    0.04    0.01    0       0.01    0.02 ......J1tKJ2-copy
   6      42.80    1       0.01    0.04    0.02    0       0.02    0.03 ......J2tKJ1-copy

Work on the MechanicalMatrixMapper has been done in collaboration with @Esther-R.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: clean Cleaning the code pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status to review To notify reviewers to review this pull-request labels Sep 28, 2021
Copy link
Contributor

@olivier-goury olivier-goury left a comment

Choose a reason for hiding this comment

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

Thank you for this PR! I am looking forward to the future changes.

@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Sep 28, 2021
…apper_timers

# Conflicts:
#	examples/Components/animationloop/MechanicalMatrixMapper.pyscn
@alxbilger
Copy link
Contributor Author

[ci-build][with-all-tests]

@guparan guparan merged commit 1e7c9a8 into sofa-framework:master Sep 29, 2021
@guparan guparan added this to the v21.12 milestone Oct 1, 2021
damienmarchal pushed a commit to CRIStAL-PADR/sofa that referenced this pull request Oct 11, 2021
…ork#2362)

* [examples] Make scene resolution independent + doc

* [SofaGeneralAnimationLoop] Use advanced timers

* [examples] adjust scene parameters for benchmarking

Add rayleigh damping for stability
@alxbilger alxbilger deleted the mechanicalmatrixmapper_timers branch June 28, 2022 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants