From 81841bd6dd5b11be4e83accbc3cbfe404d347aab Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 14 Nov 2023 14:09:15 -0700 Subject: [PATCH 1/2] move userworkbeforeloop before outputs --- src/driver/driver.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/driver/driver.cpp b/src/driver/driver.cpp index 03acf820e536..c0e21414e576 100644 --- a/src/driver/driver.cpp +++ b/src/driver/driver.cpp @@ -65,15 +65,6 @@ DriverStatus EvolutionDriver::Execute() { PreExecute(); InitializeBlockTimeStepsAndBoundaries(); SetGlobalTimeStep(); - OutputSignal signal = OutputSignal::none; - pouts->MakeOutputs(pmesh, pinput, &tm, signal); - pmesh->mbcnt = 0; - int perf_cycle_offset = - pinput->GetOrAddInteger("parthenon/time", "perf_cycle_offset", 0); - - // Output a text file of all parameters at this point - // Defaults must be set across all ranks - DumpInputParameters(); // Before loop do work // App input version @@ -81,13 +72,22 @@ DriverStatus EvolutionDriver::Execute() { if (app_input->UserWorkBeforeLoop != nullptr) { app_input->UserWorkBeforeLoop(pmesh, pinput, tm); } - // packages version for (auto &[name, pkg] : pmesh->packages.AllPackages()) { pkg->UserWorkBeforeLoop(pmesh, pinput, tm); } Kokkos::Profiling::popRegion(); // Driver_UserWorkBeforeLoop + OutputSignal signal = OutputSignal::none; + pouts->MakeOutputs(pmesh, pinput, &tm, signal); + pmesh->mbcnt = 0; + int perf_cycle_offset = + pinput->GetOrAddInteger("parthenon/time", "perf_cycle_offset", 0); + + // Output a text file of all parameters at this point + // Defaults must be set across all ranks + DumpInputParameters(); + Kokkos::Profiling::pushRegion("Driver_Main"); while (tm.KeepGoing()) { if (Globals::my_rank == 0) OutputCycleDiagnostics(); From 9c6a00aba61f49f7abe15aad489a104532f6efd2 Mon Sep 17 00:00:00 2001 From: Jonah Maxwell Miller Date: Tue, 14 Nov 2023 14:12:23 -0700 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 051e8cc3fe66..15c5692f356e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - [[PR 868]](https://github.com/parthenon-hpc-lab/parthenon/pull/868) Add block-local face, edge, and nodal fields and allow for packing ### Changed (changing behavior/API/variables/...) +- [[PR 976]](https://github.com/parthenon-hpc-lab/parthenon/pull/976) Move UserWorkBeforeLoop to be after first output - [[PR 965]](https://github.com/parthenon-hpc-lab/parthenon/pull/965) Allow leading whitespace in input parameters - [[PR 926]](https://github.com/parthenon-hpc-lab/parthenon/pull/926) Internal refinement op registration - [[PR 897]](https://github.com/parthenon-hpc-lab/parthenon/pull/897) Deflate compression filter is not called any more if compression is soft disabled