Skip to content
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

[trivial] move userworkbeforeloop before outputs #976

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/driver/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,29 +65,29 @@ 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
Kokkos::Profiling::pushRegion("Driver_UserWorkBeforeLoop");
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();
Expand Down
Loading