-
Notifications
You must be signed in to change notification settings - Fork 630
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
unify split_by_effort and split_by_cost #1499
Conversation
Changing to meep: error in test_cyl_metal_mirror nonlinear vacuum
meep: error in test_cyl_metal_mirror nonlinear vacuum
real part = 0.00432538 differs by -8.74538e-05 from 0.00441284
This gives a fractional error of 0.019818
er differs by 8.74538e-05-8.30032e-05i from 0.00441284-0.00354327i
This comes out to a fractional error of 0.0213051
Right now I'm looking at z = 0.5, r = 0.01, time 8 |
Since the only thing that this PR should have changed, I would print out the ivecs of the chunk coordinates in this PR vs master for the failing test, to see what changed. |
For the failing test, this PR and master are producing different chunk divisions for the 2d cell using cylindrical coordinates as shown in the figure below. The figure shows the The change in the chunk division introduced by this PR is due to this line which is slightly different than the original Lines 1101 to 1102 in 761e31b
However, it seems that the chunk division is not the source of the test failure because removing the nonlinearities from the failing test (deleting the lines with Lines 145 to 146 in 761e31b
Perhaps this suggests there is an unrelated bug somewhere in Lines 871 to 905 in 761e31b
|
Outputting the
|
…rdinates and z-mirror symmetry
The failing tests described in #1506 have been disabled for the time being because they are unrelated to this PR. |
* remove prime factor splitting from split_by_cost * remove split_by_effort and just make it a subset of split_by_cost * disable failing test_cyl_metal_mirror_nonlinear in tests/symmetry.cpp * rename frag_cost to fragment_cost * modify tests/symmetry.cpp to only compare_point after certain time * reorder if statements to assign split_measure * disable parallel runs of tests involving 2d cell with cylindrical coordinates and z-mirror symmetry
Closes #1498.
This PR unifies
split_by_cost
andsplit_by_effort
based on the outline in #1498.split_by_effort
has been removed entirely and been made a subset ofsplit_by_cost
which now contains a boolean flag to specify whether to use either the fragment statistics or the pixel count as the cost function for the givengrid_volume
. The original recursive bisection to chunk subdivision is retained (which is cache oblivious as described in #1492).split_by_cost
now works for an arbitrary number of chunks and is no longer based on prime factors. The runtime performance ofsplit_by_effort
is improved as it computes the entire chunk division in one go rather than the previous approach which involved separate recursive calls to determine each chunk.A comparison of the chunk layouts for the two different methods using a 2d square cell with just vacuum is shown below. The two methods produce nearly identical results in most cases although there are small differences (which are highlighted in the figures). These differences are the result of rounding errors in the cost function using the fragment statistics.
All tests in the
make check
suite pass except for the subtesttest_cyl_metal_mirror_nonlinear
inmeep/tests/symmetry.cpp
which has been disabled:meep/tests/symmetry.cpp
Lines 135 to 176 in 7067536
This failing test involves a z-mirror symmetry plane in a cell with cylindrical coordinates which seems to be affected by the small change in the
split_by_effort
chunk division method.