-
Notifications
You must be signed in to change notification settings - Fork 348
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
Adding bittree interface to improve regridding performance in octree mode #3555
Conversation
8e3cb73
to
74c5b5e
Compare
…mode Co-authored-by: Tom Klosterman <https://github.com/tklos96>
74c5b5e
to
b18c8c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a CI after this a merged.
Co-authored-by: Weiqun Zhang <[email protected]>
Co-authored-by: Weiqun Zhang <[email protected]>
Co-authored-by: Weiqun Zhang <[email protected]>
Co-authored-by: Weiqun Zhang <[email protected]>
Co-authored-by: Weiqun Zhang <[email protected]>
Co-authored-by: Weiqun Zhang <[email protected]>
I think the refine-derefine criteria maybe too strict. I can look into this after the merge and create a follow-up PR |
I think we cannot do much better, given the octtree-mimicking parameters that we are using (and have been using way before Bittree) in Flash-X for the AMR/Amrex Grid implementation: ! Setup AMReX in octree mode
call pp_amr%add ("max_grid_size_x", NXB)
call pp_amr%add ("max_grid_size_y", NYB)
call pp_amr%add ("max_grid_size_z", NZB)
call pp_amr%add ("blocking_factor_x", 2*NXB)
call pp_amr%add ("blocking_factor_y", 2*NYB)
call pp_amr%add ("blocking_factor_z", 2*NZB)
call pp_amr%add ("refine_grid_layout", 0)
call pp_amr%add ("grid_eff", 1.0)
! According to Weiqun n_proper=1 is an appropriate setting that will result in
! correct nesting.
call pp_amr%add("n_proper", 1) This is from our (I think at one point at least I understood how the |
…mode (AMReX-Codes#3555) ## Summary This PR introduces dependency on [Bittree library](https://github.com/Flash-X/Bittree) to improve regridding performance in octree mode. ## Additional background Testing and development of this feature is done in sync with Flash-X and is recorded in this [reproducibility capsule](https://github.com/Lab-Notebooks/AMReX-Bittree-Performance). This PR is primarily created to consolidate development work and avoid creating multiple branches. At present using AMReX+Bittree improves regridding performance [by a factor of 2](https://github.com/Lab-Notebooks/AMReX-Bittree-Performance/blob/14faa2212c4e5dba7fd99a6526c6937414f9c109/analysis/Performance.ipynb) at > 20000 ranks. We hope to improve performance further using a bittree-based distribution mapping and therefore adding a new function `AmrMesh::MakeDistributionMap` as a place-holder. Continuation of AMReX-Codes#2893 and AMReX-Codes#3547 ## Checklist The proposed changes: - [ ] fix a bug or incorrect behavior in AMReX - [x] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate --------- Co-authored-by: Weiqun Zhang <[email protected]> Co-authored-by: Tom Klosterman <https://github.com/tklos96>
@WeiqunZhang Can you create a time evolution so we can see how derefinement logic is working? It maybe possible that derefinement logic is not very strict. |
Summary
This PR introduces dependency on Bittree library to improve regridding performance in octree mode.
Additional background
Testing and development of this feature is done in sync with Flash-X and is recorded in this reproducibility capsule. This PR is primarily created to consolidate development work and avoid creating multiple branches. At present using AMReX+Bittree improves regridding performance by a factor of 2 at > 20000 ranks. We hope to improve performance further using a bittree-based distribution mapping and therefore adding a new function
AmrMesh::MakeDistributionMap
as a place-holder.Continuation of #2893 and #3547
Checklist
The proposed changes: