fmihpc / vlasiator

Vlasiator - ten letters you can count on
https://www.helsinki.fi/en/researchgroups/vlasiator
Other
48 stars 39 forks source link

Fix refine/coarsen logging #1036

Open lkotipal opened 1 month ago

lkotipal commented 1 month ago

Use correct datatype for logging coarsened cells. Oops...

markusbattarbee commented 1 month ago

So the counts still don't quite add up.

According to this line: https://github.com/fmihpc/dccrg/blob/d7a7746bcbcf53909acfd85d19dd29de8b0f123a/dccrg.hpp#L2495C6-L2495C7 each process tags only one of all siblings to unrefine. However, I guess if two siblings are on different processes, that would count as two unrefines, and if siblings exist on three different processes, then three.

The easiest workaround might be to actually store all siblings in this set, so that the reducet unrefine count would include all siblings, but change it so that when executing unrefines, siblings beyond the first are ignored. Thoughts?

ykempf commented 1 month ago

I suppose one part of the question is: do we actually need the exact values? But I fear part of the answer is: as soon as we decide that "no", next week we'll start debugging a case that will require the actually correct values. So... I suppose we do want them?

lkotipal commented 1 month ago

So the counts still don't quite add up.

According to this line: https://github.com/fmihpc/dccrg/blob/d7a7746bcbcf53909acfd85d19dd29de8b0f123a/dccrg.hpp#L2495C6-L2495C7 each process tags only one of all siblings to unrefine. However, I guess if two siblings are on different processes, that would count as two unrefines, and if siblings exist on three different processes, then three.

The easiest workaround might be to actually store all siblings in this set, so that the reducet unrefine count would include all siblings, but change it so that when executing unrefines, siblings beyond the first are ignored. Thoughts?

I could just refactor the loop on https://github.com/fmihpc/dccrg/blob/d7a7746bcbcf53909acfd85d19dd29de8b0f123a/dccrg.hpp#L3503 earlier on, like the end of override_unrefines?