MPI Implementation for hyperbolic-parabolic system and the P4est Mesh#2880
MPI Implementation for hyperbolic-parabolic system and the P4est Mesh#2880TJP-Karpowski wants to merge 8 commits intotrixi-framework:mainfrom
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2880 +/- ##
==========================================
- Coverage 97.05% 96.26% -0.78%
==========================================
Files 606 608 +2
Lines 47371 48378 +1007
==========================================
+ Hits 45972 46571 +599
- Misses 1399 1807 +408
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for working on this, MPI readyness for NSF has been for long on my list. We need you to break this PR down into multiple ones
Furthermore, I would ask you to carefully test this - I tried adding some more MPI tests in #2710 for the flux-differencing and shock-capturing routines, which were back then not really realiable. |
|
Thank you for the feedback, I can split this into multiple PRs. Note that currently 2D MPI treatment is not implemented as for my usecase and understanding 2D cases often still fit on one machine. So if it is alright I would only implement 3D for now and split this into possibly these PRs:
Does that sound like a reasonable split for you? If so I will adapt it accordingly. Do you have some tips for testing, or ideas what you would like to see? |
|
Hm, so while most 2D cases should still fit on one machine, some high resolution simulations (I am thinking about shock-boundary, shock- bubble/multiphase interaction) might quickly get limited due to memory access (we see essentially that multithreaded maybe scales good until 16 cores, but flattens off at that point). So I am very much in favor of adding a 2D implementation first, as this is much easier to debug. What is Regarding |
|
IndicatorPositional is indeed indepentend it is just a AMR indicator which takes a f(x,t) and can then be used to do AMR in specific locations. In the testcase I use it to force some uneven refinment to test the mortars. But for example to refine a specific location e.g. near walls, I think it is generally useful. I can restrict the cache_parabolic to the parallel p4est cases for now. Then I can try:
Does that sound good? |
|
Yeah sounds good! |
MPI Implementation for parabolic system and the P4est Mesh
Hello Trixi-Team,
Currently, the hyperbolic-parabolic system seem not to be (MPI-ready)[https://discourse.julialang.org/t/nan-value-with-parallelization-on-trixi-jl-taylor-green-vortex-test-case/116765].
This PR implements this capability.
Peyvan et al. (2025) described the necessary adaptations , although I could not find any corresponding commits or repository. Thus, I implemented the described extension to the cache_parabolic part, enabling MPI parallelization for hyperbolic-parabolic systems by extending the cache_parabolic with element, interface, and boundary caches and implementing the required MPI logic to use the parabolic system with MPI parallelization.
Testcases
To test the implementation, the Taylor Green Vortex (TGV) testcases are reused in the MPI test sets. Further, I created another testcase with static refinement in two diagonal quadrants of the TGV domain to force MPIMortars to be tested.
I have verified that the local i.e., only thread-based parallelized, and the MPI code result in the same profiles of K and epsilon (-dK/dt) for both the baseline Mesh with homogeneous refinement:
and also for the unevenly refined mesh in
examples/p4est_3d_dgsem/elixir_navierstokes_taylor_green_vortex_amr_mortar.jlIn these figures, the DNS data is taken from Zirwes et al. (2023) and is only included as a visual aid to assess plausibility.
Questions/Remarks
Disclaimer
LLMs have been used to create the PR.
Funding Statement
This work has been funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project Number 237267381 – TRR 150.