diff --git a/src/QMCDrivers/DMC/DMCBatched.cpp b/src/QMCDrivers/DMC/DMCBatched.cpp index 9bc54bb7ef..cbeb9ab925 100644 --- a/src/QMCDrivers/DMC/DMCBatched.cpp +++ b/src/QMCDrivers/DMC/DMCBatched.cpp @@ -304,8 +304,11 @@ void DMCBatched::advanceWalkers(const StateForThread& sft, crowd.accumulate(step_context.get_random_gen()); } - // collect walker logs - crowd.collectStepWalkerLog(sft.global_step); + { + ScopedTimer walker_log_timer(timers.walker_log_timer); + // collect walker logs + crowd.collectStepWalkerLog(sft.global_step); + } { // T-moves ScopedTimer tmove_timer(dmc_timers.tmove_timer); @@ -458,10 +461,14 @@ bool DMCBatched::run() //initialize WalkerLogManager and collectors WalkerLogManager wlog_manager(walker_logs_input, allow_walker_logs, get_root_name(), myComm); - for (auto& crowd : crowds_) - crowd->setWalkerLogCollector(wlog_manager.makeCollector()); - //register walker log collectors into the manager - wlog_manager.startRun(Crowd::getWalkerLogCollectorRefs(crowds_)); + + { + ScopedTimer walker_log_timer(timers_.walker_log_timer); + for (auto& crowd : crowds_) + crowd->setWalkerLogCollector(wlog_manager.makeCollector()); + //register walker log collectors into the manager + wlog_manager.startRun(Crowd::getWalkerLogCollectorRefs(crowds_)); + } StateForThread dmc_state(qmcdriver_input_, *drift_modifier_, *branch_engine_, population_, steps_per_block_, serializing_crowd_walkers_); @@ -532,7 +539,10 @@ bool DMCBatched::run() if (qmcdriver_input_.get_measure_imbalance()) measureImbalance("Block " + std::to_string(block)); endBlock(); - wlog_manager.writeBuffers(); + { + ScopedTimer walker_log_timer(timers_.walker_log_timer); + wlog_manager.writeBuffers(); + } recordBlock(block); } diff --git a/src/QMCDrivers/QMCDriverNew.h b/src/QMCDrivers/QMCDriverNew.h index 6d340c1a68..1abc859d88 100644 --- a/src/QMCDrivers/QMCDriverNew.h +++ b/src/QMCDrivers/QMCDriverNew.h @@ -372,6 +372,7 @@ class QMCDriverNew : public QMCDriverInterface, public MPIObjectBase NewTimer& startup_timer; NewTimer& production_timer; NewTimer& resource_timer; + NewTimer& walker_log_timer; DriverTimers(const std::string& prefix) : checkpoint_timer(createGlobalTimer(prefix + "CheckPoint", timer_level_medium)), run_steps_timer(createGlobalTimer(prefix + "RunSteps", timer_level_medium)), @@ -386,7 +387,8 @@ class QMCDriverNew : public QMCDriverInterface, public MPIObjectBase endblock_timer(createGlobalTimer(prefix + "BlockEndDataAggregation", timer_level_medium)), startup_timer(createGlobalTimer(prefix + "Startup", timer_level_medium)), production_timer(createGlobalTimer(prefix + "Production", timer_level_medium)), - resource_timer(createGlobalTimer(prefix + "Resources", timer_level_medium)) + resource_timer(createGlobalTimer(prefix + "Resources", timer_level_medium)), + walker_log_timer(createGlobalTimer(prefix + "Walker Logging", timer_level_fine)) {} };