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 3d Nédélec shape functions #3874

Open
wants to merge 1 commit 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...

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