You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tricky part is that to estimate the per-box weights, we have to keep track of a Multifab on each level that stores the cost per cell, since in general we have a completely different set of boxes after a regrid. Then we have to sum up the values of this Multifab in each box to get the vector of per-box weights.
BenWibking
changed the title
load balance based on chemistry cost during AMR regrid
load balance based on reaction term cost during AMR regrid
Dec 8, 2024
Describe the proposal
We can optionally load balance the boxes based on their cost, e.g. rhs calls for chemistry.
This can be done by overriding
AmrCore::regrid()
with a function that does the same regridding, except with a custom DistributionMapping created with per-box weights:https://github.com/AMReX-Codes/amrex/blob/96db0a665ff1e6bbe638490fd02d3aafb9188f6b/Src/AmrCore/AMReX_AmrCore.cpp#L85
The tricky part is that to estimate the per-box weights, we have to keep track of a Multifab on each level that stores the cost per cell, since in general we have a completely different set of boxes after a regrid. Then we have to sum up the values of this Multifab in each box to get the vector of per-box weights.
WarpX example usage:
https://github.com/ECP-WarpX/WarpX/blob/3f3c91d09a7f9d53f09419b56a68dac29e20407f/Source/Parallelization/WarpXRegrid.cpp#L109
(However, we can't directly copy the WarpX code, since that is implemented in a way that only works for static mesh refinement.)
Describe alternatives you've considered
Don't load balance based on chemistry cost.
Additional context
This will be useful for simulations with chemistry. This could also be useful for simulations with optically-thin cooling.
The text was updated successfully, but these errors were encountered: