-
Notifications
You must be signed in to change notification settings - Fork 3
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] Gauss-Legendre poles and weights in profile_functions.f #41
Conversation
It looks like the test failures here are being caused by the tolerance being set to low. Some about of deviation is expected due to parallel reductions. Setting the tolarance values in https://github.com/ORNL-Fusion/PARVMEC/blob/master/Testing/tests/free_boundary_test/CMakeLists.txt should fix that. You can ignore the test failure in siesta_final_phipf_test since that happens randomly due to randomly sampling the value. Rerunning that test using makes it pass. I should make that test more robust but I just haven't gotten around to it. |
Actually the output quantities in VMEC are expected to change on the order of ca. 1e-8 in case the [Edit] I just saw that those test merely compare the parallel vs. the serial implementation (?). In that case, I agree that relaxing the tolerances is probably ok and I can go ahead and figure out the values that make the tests pass again. |
In this case the reference data is a comparison between serial and parallel runs. We should consider using known reference cases going forward in the future. |
b9dfcea
to
15bb761
Compare
Master dev
... are only parsed with single-precision if specified without explicit double-precision suffix in the source code.
a0acb03
to
9765d49
Compare
... are only parsed with single-precision
if specified without explicit double-precision suffix in the source code.
I found out (the hard way) that the constants used for Gauss-Legendre quadrature in profile_functions.f are only parsed with single-precision accuracy from the source file. This PR adds the _rprec suffixes to the constants in order to make Fortran aware of the available double-precision accuracy. This helps in comparisons with implementations in other languages.
Also, trailing whitespace is removed in this source code file in order to clean up future diffs. Sorry for the noise. The relevant changes are on lines 69 - 90.