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

Fix Nalu timers #18

Merged
merged 1 commit into from
Jul 9, 2018
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
4 changes: 2 additions & 2 deletions nalu.C
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ int main( int argc, char ** argv )

//output timings consistent w/ rest of Sierra
stk::diag::Timer & sierra_timer = sierra::nalu::Simulation::rootTimer();
const double elapsed_time = sierra_timer.getMetric<stk::diag::CPUTime>().getAccumulatedLap(false);
const double elapsed_time = sierra_timer.getMetric<stk::diag::WallTime>().getAccumulatedLap(false);
stk::diag::Timer & mesh_output_timer = sierra::nalu::Simulation::outputTimer();
double mesh_output_time = mesh_output_timer.getMetric<stk::diag::CPUTime>().getAccumulatedLap(false);
double mesh_output_time = mesh_output_timer.getMetric<stk::diag::WallTime>().getAccumulatedLap(false);
double time_without_output = elapsed_time-mesh_output_time;

stk::parallel_print_time_without_output_and_hwm(naluEnv.parallel_comm(), time_without_output, naluEnv.naluOutputP0());
Expand Down
32 changes: 19 additions & 13 deletions src/LowMachEquationSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ LowMachEquationSystem::solve_and_update()
// wrap timing
double timeA, timeB;
if ( isInit_ ) {
timeA = NaluEnv::self().nalu_time();
continuityEqSys_->compute_projected_nodal_gradient();
timeA = NaluEnv::self().nalu_time();
continuityEqSys_->computeMdotAlgDriver_->execute();

timeB = NaluEnv::self().nalu_time();
Expand Down Expand Up @@ -697,10 +697,7 @@ LowMachEquationSystem::solve_and_update()
continuityEqSys_->timerMisc_ += (timeB-timeA);

// project nodal velocity
timeA = NaluEnv::self().nalu_time();
project_nodal_velocity();
timeB = NaluEnv::self().nalu_time();
timerMisc_ += (timeB-timeA);

// compute velocity relative to mesh with new velocity
realm_.compute_vrtm();
Expand All @@ -710,8 +707,8 @@ LowMachEquationSystem::solve_and_update()
// we use this approach to avoid two evals per
// solve/update since dudx is required for tke
// production
timeA = NaluEnv::self().nalu_time();
momentumEqSys_->compute_projected_nodal_gradient();
timeA = NaluEnv::self().nalu_time();
momentumEqSys_->compute_wall_function_params();
timeB = NaluEnv::self().nalu_time();
momentumEqSys_->timerMisc_ += (timeB-timeA);
Expand Down Expand Up @@ -951,16 +948,25 @@ MomentumEquationSystem::initial_work()
EquationSystem::initial_work();

// proceed with a bunch of initial work; wrap in timer
const double timeA = NaluEnv::self().nalu_time();
realm_.compute_vrtm();
{
const double timeA = NaluEnv::self().nalu_time();
realm_.compute_vrtm();
const double timeB = NaluEnv::self().nalu_time();
timerMisc_ += (timeB-timeA);
}

compute_projected_nodal_gradient();
compute_wall_function_params();
tviscAlgDriver_->execute();
diffFluxCoeffAlgDriver_->execute();
cflReyAlgDriver_->execute();

const double timeB = NaluEnv::self().nalu_time();
timerMisc_ += (timeB-timeA);
{
const double timeA = NaluEnv::self().nalu_time();
compute_wall_function_params();
tviscAlgDriver_->execute();
diffFluxCoeffAlgDriver_->execute();
cflReyAlgDriver_->execute();

const double timeB = NaluEnv::self().nalu_time();
timerMisc_ += (timeB-timeA);
}
}

//--------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions src/Realm.C
Original file line number Diff line number Diff line change
Expand Up @@ -3976,10 +3976,6 @@ Realm::dump_simulation_time()
<< " \tmin: " << g_min_time[4] << " \tmax: " << g_max_time[4] << std::endl;
NaluEnv::self().naluOutputP0() << " io populate fd -- " << " \tavg: " << g_total_time[5]/double(nprocs)
<< " \tmin: " << g_min_time[5] << " \tmax: " << g_max_time[5] << std::endl;
NaluEnv::self().naluOutputP0() << "Timing for connectivity/finalize lysys: " << std::endl;
NaluEnv::self().naluOutputP0() << " eqs init -- " << " \tavg: " << g_total_time[2]/double(nprocs)
<< " \tmin: " << g_min_time[2] << " \tmax: " << g_max_time[2] << std::endl;

NaluEnv::self().naluOutputP0() << "Timing for property evaluation: " << std::endl;
NaluEnv::self().naluOutputP0() << " props -- " << " \tavg: " << g_total_time[3]/double(nprocs)
<< " \tmin: " << g_min_time[3] << " \tmax: " << g_max_time[3] << std::endl;
Expand Down