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 code for ND1 and RT shape functions #3874

Draft
wants to merge 8 commits into
base: devel
Choose a base branch
from

Conversation

nmnobre
Copy link
Member

@nmnobre nmnobre commented Jun 11, 2024

Pending benchmarking...

Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

I certainly like this, and I doubt it'll show any problems in benchmarking. I'd bet you'll need to run something that really hammers assembly alone, on a large mesh, or any change in timings will end up swamped by overhead and/or the solver.

@moosebuild
Copy link

moosebuild commented Jun 11, 2024

Job Coverage on 8f16abc wanted to post the following:

Coverage

61691f #3874 8f16ab
Total Total +/- New
Rate 62.72% 62.74% +0.02% 86.52%
Hits 69377 69298 -79 77
Misses 41234 41157 -77 12

Diff coverage report

Full coverage report

Warnings

  • New new line coverage rate 86.52% is less than the suggested 90.0%

This comment will be updated on new commits.

@nmnobre
Copy link
Member Author

nmnobre commented Jun 12, 2024

Errrmmm, so I compiled libMesh with MOOSE's default configuration plus --enable-perflog.
Then ran the 3d Nédélec one example, i.e. vector_fe/ex4, with grid_size = 15, 5 times with
for i in {1..5}; do ./example-opt element_type=TET14 -pc_type jacobi | grep "| FE " -A2; done.

BEFORE:

| FE                                                                                                              |
|   compute_shape_functions()        334800     0.6720      0.000002    0.6720      0.000002    7.85     7.85     |
|   init_shape_functions()           334800     0.6295      0.000002    0.6295      0.000002    7.35     7.35     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.6651      0.000002    0.6651      0.000002    7.88     7.88     |
|   init_shape_functions()           334800     0.6184      0.000002    0.6184      0.000002    7.32     7.32     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.6665      0.000002    0.6665      0.000002    7.85     7.85     |
|   init_shape_functions()           334800     0.6228      0.000002    0.6228      0.000002    7.34     7.34     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.6638      0.000002    0.6638      0.000002    7.81     7.81     |
|   init_shape_functions()           334800     0.6203      0.000002    0.6203      0.000002    7.29     7.29     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.6720      0.000002    0.6720      0.000002    7.89     7.89     |
|   init_shape_functions()           334800     0.6219      0.000002    0.6219      0.000002    7.30     7.30     |

AFTER:

| FE                                                                                                              |
|   compute_shape_functions()        334800     0.7063      0.000002    0.7063      0.000002    8.00     8.00     |
|   init_shape_functions()           334800     0.8199      0.000002    0.8199      0.000002    9.28     9.28     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.7121      0.000002    0.7121      0.000002    8.01     8.01     |
|   init_shape_functions()           334800     0.8253      0.000002    0.8253      0.000002    9.28     9.28     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.7071      0.000002    0.7071      0.000002    7.96     7.96     |
|   init_shape_functions()           334800     0.8180      0.000002    0.8180      0.000002    9.21     9.21     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.7095      0.000002    0.7095      0.000002    8.01     8.01     |
|   init_shape_functions()           334800     0.8161      0.000002    0.8161      0.000002    9.21     9.21     |
| FE                                                                                                              |
|   compute_shape_functions()        334800     0.7188      0.000002    0.7188      0.000002    8.09     8.09     |
|   init_shape_functions()           334800     0.8235      0.000002    0.8235      0.000002    9.27     9.27     |

What's the difference between compute_shape_functions() and init_shape_functions()?
Here, init is about 32% slower and compute is 6% slower...

@nmnobre nmnobre force-pushed the ndHO branch 2 times, most recently from a6eb782 to bf42d86 Compare June 12, 2024 18:54
@nmnobre nmnobre marked this pull request as ready for review June 12, 2024 22:15
@nmnobre nmnobre force-pushed the ndHO branch 3 times, most recently from 1109be4 to 8f16abc Compare June 13, 2024 18:11
@nmnobre nmnobre force-pushed the ndHO branch 2 times, most recently from 9038173 to 7d8249e Compare August 6, 2024 10:18
@nmnobre nmnobre marked this pull request as draft October 23, 2024 10:59
@nmnobre nmnobre changed the title Refactor code for 3d Nédélec shape functions Refactor code for 3d ND1 and RT shape functions Oct 23, 2024
@nmnobre nmnobre changed the title Refactor code for 3d ND1 and RT shape functions Refactor code for ND1 and RT shape functions Oct 23, 2024
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.

3 participants