@@ -260,6 +260,10 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks,
260260 auto rkl2_step_first = tl.AddTask (init_MY0, RKL2StepFirst, Y0.get (), base.get (),
261261 Yjm2.get (), MY0.get (), s_rkl, tau);
262262
263+ // if prolongate on prims is done then this is a ConsToPrim call. Otherwise, noop.
264+ auto precomm_fill_derived =
265+ tl.AddTask (rkl2_step_first, parthenon::Update::PreCommFillDerived<MeshData<Real>>,
266+ base.get ());
263267 // Update ghost cells of Y1 (as MY1 is calculated for each Y_j).
264268 // Y1 stored in "base", see rkl2_step_first task.
265269 // Update ghost cells (local and non local), prolongate and apply bound cond.
@@ -268,7 +272,7 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks,
268272 // best impl. Go with default call (split local/nonlocal) for now.
269273 // TODO(pgrete) optimize (in parthenon) to only send subset of updated vars
270274 auto bounds_exchange = parthenon::AddBoundaryExchangeTasks (
271- rkl2_step_first | start_bnd, tl, base, pmesh->multilevel );
275+ precomm_fill_derived | start_bnd, tl, base, pmesh->multilevel );
272276
273277 tl.AddTask (bounds_exchange, parthenon::Update::FillDerived<MeshData<Real>>,
274278 base.get ());
@@ -326,14 +330,18 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks,
326330 tl.AddTask (set_flx, RKL2StepOther, Y0.get (), base.get (), Yjm2.get (), MY0.get (),
327331 mu_j, nu_j, mu_tilde_j, gamma_tilde_j, tau);
328332
333+ // if prolongate on prims is done then this is a ConsToPrim call. Otherwise, noop.
334+ auto precomm_fill_derived =
335+ tl.AddTask (rkl2_step_other,
336+ parthenon::Update::PreCommFillDerived<MeshData<Real>>, base.get ());
329337 // update ghost cells of base (currently storing Yj)
330338 // Update ghost cells (local and non local), prolongate and apply bound cond.
331339 // TODO(someone) experiment with split (local/nonlocal) comms with respect to
332340 // performance for various tests (static, amr, block sizes) and then decide on the
333341 // best impl. Go with default call (split local/nonlocal) for now.
334342 // TODO(pgrete) optimize (in parthenon) to only send subset of updated vars
335343 auto bounds_exchange = parthenon::AddBoundaryExchangeTasks (
336- rkl2_step_other | start_bnd, tl, base, pmesh->multilevel );
344+ precomm_fill_derived | start_bnd, tl, base, pmesh->multilevel );
337345
338346 tl.AddTask (bounds_exchange, parthenon::Update::FillDerived<MeshData<Real>>,
339347 base.get ());
@@ -561,11 +569,15 @@ TaskCollection HydroDriver::MakeTaskCollection(BlockList_t &blocks, int stage) {
561569 tl.AddTask (source_split_strang_final, AddSplitSourcesFirstOrder, mu0.get (), tm);
562570 }
563571
572+ // if prolongate on prims is done then this is a ConsToPrim call. Otherwise, noop.
573+ auto precomm_fill_derived =
574+ tl.AddTask (source_split_first_order,
575+ parthenon::Update::PreCommFillDerived<MeshData<Real>>, mu0.get ());
564576 // Update ghost cells (local and non local), prolongate and apply bound cond.
565577 // TODO(someone) experiment with split (local/nonlocal) comms with respect to
566578 // performance for various tests (static, amr, block sizes) and then decide on the
567579 // best impl. Go with default call (split local/nonlocal) for now.
568- parthenon::AddBoundaryExchangeTasks (source_split_first_order | start_bnd, tl, mu0,
580+ parthenon::AddBoundaryExchangeTasks (precomm_fill_derived | start_bnd, tl, mu0,
569581 pmesh->multilevel );
570582 }
571583
0 commit comments