-
Notifications
You must be signed in to change notification settings - Fork 49
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
Ag/pr vectorized second derivative volume #402
Merged
andrewgiuliani
merged 11 commits into
master
from
ag/pr_vectorized_second_derivative_volume
Apr 15, 2024
Merged
Ag/pr vectorized second derivative volume #402
andrewgiuliani
merged 11 commits into
master
from
ag/pr_vectorized_second_derivative_volume
Apr 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… surface complexity
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #402 +/- ##
==========================================
- Coverage 91.64% 91.58% -0.06%
==========================================
Files 74 74
Lines 12987 12911 -76
==========================================
- Hits 11902 11825 -77
- Misses 1085 1086 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
landreman
approved these changes
Apr 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a vectorized implementation of the second derivative of volume wrt to surface dofs calculation. This is useful for the BoozerLS calculation when volume is used as a surface label. Running the timing test:
I obtain the following timings for the original implementation:
I run out of RAM for
mpol, ntor >= 12
. This is due (in part) to the line that computesd2nor_dcdc
:simsopt/src/simsoptpp/surface.cpp
Line 786 in dd1989d
This array stores the second derivative of the normal vector at all the surface quadrature points, totalling
3*nquadpoints_phi*nquadpoints_theta*ndofs*ndofs
doubles. In the new vectorized implementation, I compute the entries ofd2nor_dcdc
on the fly, which alleviates memory requirements. Timings for the new vectorized implementation with a simd batchsize of 8 is:The original implementation is still used when
xsimd
is not available. I have not vectorizedd2area_by_dcoeffdcoeff
, because I typically do not use area as a surface label in the BoozerLS algorithm. However, it suffers from issues as mpol, ntor increase too.