-
Notifications
You must be signed in to change notification settings - Fork 159
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
BUG: Cross mesh interpolation breaks for parallel nested meshes #3151
Comments
I think there's a bug somewhere in cell location - I'm seeing |
This may also be related to #3089 |
This is at least in part due to insufficient robustness in the vertex-only mesh voting algorithm. 2 things need to be done. Where multiple ranks claim the same In these rare cases, the voting algorithm can also claim that a rank which has identified a point as self-owned will be told by a rank of higher number that a rank of lower number in fact owns the point: if that lower rank does not think it owns it then the above procedure would cause the point to be lost. |
I have been thinking about this issue and I think that there is a simpler solution. The problemConsider the following example:
Vertex
Solution?I think that the solution to this is to preferentially assign points to cells that are owned over ghost cells. |
Yes. How did we not think of this years ago. |
I believe the underlying issue you describe is fixed in
#3293 which uses the
actual voting algorithm I describe in my thesis (not the broken one which
is implemented). Does it occur there?
…On Fri, 11 Oct 2024 at 10:24, David A. Ham ***@***.***> wrote:
Yes. How did we not think of this years ago.
—
Reply to this email directly, view it on GitHub
<#3151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4I73LZ6ZDQF37PJLNKIRTZ26KM7AVCNFSM6AAAAABPYQNOB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGAYDKMJYGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ah I see I missed the context of your comment. Indeed this issue was fixed but the branch was never merged because of a minor test failure that I didn't have time to get to the bottom of. I think your solution should also work, but it's possible that the voting algorithm in |
For reference, the voting algorithm as implemented in #3293 is described in section 7.5 of my thesis |
Good to hear from you Reuben!
AIUI the current voting algorithm works correctly in Before merging #3293 I would like to try my approach out first. I think it would constitute a much smaller change to the code. Effectively we need to modify best_cell = None
best_cell_is_owned = False
closest_dist = np.inf
for cell in candidate_cells:
l1_dist = get_l1_dist(cell)
if is_owned(cell):
if l1_dist <= 0:
# found cell, stop here
best_cell = cell
break
elif l1_dist < tolerance and l1_dist < closest_dist:
# found a candidate
best_cell = cell
best_cell_is_owned = True
closest_dist = l1_dist
else: # ghost cell
if best_cell_is_owned:
# do not consider ghost cells if an owned cell already claims to own the point
continue
elif l1_dist < tolerance and l1_dist < closest_dist:
best_cell = cell
closest_dist = l1_dist
return best_cell I believe that this is sufficient to resolve the issue. Checking |
Bother. Needs more work. |
Describe the bug
Cross mesh interpolation fails for certain combinations of number of cells on the two meshes and number of MPI ranks.
We get the following error message:
Steps to Reproduce
Steps to reproduce the behavior:
The code breaks if we run with more than 2 MPI ranks
Expected behavior
Describe what you expected to happen, in the case of a regression,
include details of a setup where this behaviour was last seen.
Error message
Add error message with full backtrace, or log.
Please add these as text using three backticks (`) for highlighting.
Please do not add screenshots unless the bug is purely graphical.
Environment:
firedrake-status
Additional Info
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: