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

Add timer for walker log #5259

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
24 changes: 17 additions & 7 deletions src/QMCDrivers/DMC/DMCBatched.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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_);
Expand Down Expand Up @@ -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);
}

Expand Down
4 changes: 3 additions & 1 deletion src/QMCDrivers/QMCDriverNew.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand All @@ -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))
{}
};

Expand Down
Loading