Enable DHT time measurement

This commit is contained in:
rastogi 2025-11-06 11:49:10 +01:00
parent b82054eed6
commit f4e846d6dc
2 changed files with 10 additions and 9 deletions

View File

@ -39,13 +39,13 @@ void poet::ControlModule::initiateWarmupPhase(bool dht_enabled,
chem->SetWarmupEnabled(true); chem->SetWarmupEnabled(true);
chem->SetDhtEnabled(false); chem->SetDhtEnabled(false);
chem->SetInterpEnabled(false); chem->SetInterpEnabled(false);
// MSG("Warmup enabled until next control interval at iteration " + MSG("Warmup enabled until next control interval at iteration " +
// std::to_string(control_interval) + "."); std::to_string(control_interval) + ".");
if (rollback_enabled) { if (rollback_enabled) {
if (sur_disabled_counter > 0) { if (sur_disabled_counter > 0) {
--sur_disabled_counter; --sur_disabled_counter;
//MSG("Rollback counter: " + std::to_string(sur_disabled_counter)); MSG("Rollback counter: " + std::to_string(sur_disabled_counter));
} else { } else {
rollback_enabled = false; rollback_enabled = false;
} }
@ -64,16 +64,17 @@ void poet::ControlModule::applyControlLogic(ChemistryModule &chem,
return; return;
} }
writeCheckpointAndMetrics(chem, iter); writeCheckpointAndMetrics(chem, iter);
if (checkAndRollback(chem, iter) /* && rollback_count < 4*/) { if (checkAndRollback(chem, iter) && rollback_count < 3) {
rollback_enabled = true; rollback_enabled = true;
rollback_count++; rollback_count++;
sur_disabled_counter = control_interval; sur_disabled_counter = control_interval;
/*
MSG("Interpolation disabled for the next " + MSG("Interpolation disabled for the next " +
std::to_string(control_interval) + "."); std::to_string(control_interval) + ".");
*/
} }
} }
void poet::ControlModule::writeCheckpointAndMetrics(ChemistryModule &chem, void poet::ControlModule::writeCheckpointAndMetrics(ChemistryModule &chem,

View File

@ -439,13 +439,13 @@ static Rcpp::List RunMasterLoop(RInsidePOET &R, RuntimeParameters &params,
Rcpp::wrap(chem.GetWorkerControlTimings()); Rcpp::wrap(chem.GetWorkerControlTimings());
if (params.use_dht) { //if (params.use_dht) {
chem_profiling["dht_hits"] = Rcpp::wrap(chem.GetWorkerDHTHits()); chem_profiling["dht_hits"] = Rcpp::wrap(chem.GetWorkerDHTHits());
chem_profiling["dht_evictions"] = Rcpp::wrap(chem.GetWorkerDHTEvictions()); chem_profiling["dht_evictions"] = Rcpp::wrap(chem.GetWorkerDHTEvictions());
chem_profiling["dht_get_time"] = Rcpp::wrap(chem.GetWorkerDHTGetTimings()); chem_profiling["dht_get_time"] = Rcpp::wrap(chem.GetWorkerDHTGetTimings());
chem_profiling["dht_fill_time"] = chem_profiling["dht_fill_time"] =
Rcpp::wrap(chem.GetWorkerDHTFillTimings()); Rcpp::wrap(chem.GetWorkerDHTFillTimings());
} //}
if (params.use_interp) { if (params.use_interp) {
chem_profiling["interp_w"] = chem_profiling["interp_w"] =