Skip to content

Commit

Permalink
really aggressive timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
jtwhite79 committed Nov 26, 2024
1 parent 932b217 commit 58792a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/libs/run_managers/yamr/PantherAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void PANTHERAgent::process_ctl_file(const string &ctl_filename)
mi.set_fill_tpl_zeros(pest_scenario.get_pestpp_options().get_fill_tpl_zeros());
mi.set_tpl_force_decimal(pest_scenario.get_pestpp_options().get_tpl_force_decimal());
mi.set_num_threads(pest_scenario.get_pestpp_options().get_num_tpl_ins_threads());
mi.set_sleep_ms(100);
mi.set_sleep_ms(5);
restart_on_error = pest_scenario.get_pestpp_options().get_panther_agent_restart_on_error();
max_time_without_master_ping_seconds = pest_scenario.get_pestpp_options().get_panther_agent_no_ping_timeout_secs();
FileManager fm("panther_agent");
Expand Down Expand Up @@ -538,7 +538,7 @@ std::pair<NetPackage::PackType,std::string> PANTHERAgent::run_model(Parameters &
void PANTHERAgent::run_async(pest_utils::thread_flag* terminate, pest_utils::thread_flag* finished, exception_ptr& run_exception,
Parameters* pars, Observations* obs)
{
mi.set_sleep_ms(100);
mi.set_sleep_ms(5);
mi.run(terminate,finished,run_exception, pars, obs);
}

Expand Down
16 changes: 8 additions & 8 deletions src/libs/run_managers/yamr/RunManagerPanther.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ RunManagerAbstract::RUN_UNTIL_COND RunManagerPanther::run_until(RUN_UNTIL_COND c
}

}
w_sleep(100);
w_sleep(10);
n_no_ops = 0;
while (true)
{
Expand Down Expand Up @@ -726,7 +726,7 @@ void RunManagerPanther::run_idle_async()
idling.set(false);

// Sleep 1s to avoid spinlock
w_sleep(100);
w_sleep(10);
continue;
}

Expand Down Expand Up @@ -816,7 +816,7 @@ void RunManagerPanther::end_run_idle_async()
}

// Sleep to avoid spinlock
w_sleep(50);
w_sleep(10);
}

report("Stopped idle ping thread, as Panther manager is shutting down.", false);
Expand Down Expand Up @@ -857,7 +857,7 @@ void RunManagerPanther::pause_idle()
}

// Sleep to avoid spinlock
w_sleep(50);
w_sleep(10);
}

report("Panther idle ping thread paused prior to scheduling runs.", false);
Expand Down Expand Up @@ -1006,7 +1006,7 @@ void RunManagerPanther::close_agents()
sock_nums.push_back(si.first);
for (auto si : sock_nums)
close_agent(si);
w_sleep(100);
w_sleep(10);

}
}
Expand Down Expand Up @@ -2132,7 +2132,7 @@ RunManagerPanther::~RunManagerPanther(void)
err = w_close(listener);
FD_CLR(listener, &master);
// this is needed to ensure that the first slave closes properly
w_sleep(500);
w_sleep(10);
for (int i = 0; i <= fdmax; i++)
{
if (FD_ISSET(i, &master))
Expand Down Expand Up @@ -2248,10 +2248,10 @@ void RunManagerYAMRCondor::cleanup(int cluster)
stringstream ss;
ss << "condor_rm " << cluster << " 1>cr_temp.stdout 2>cr_temp.stderr";
system(ss.str().c_str());
w_sleep(500);
w_sleep(10);
ss.str(string());
ss << "condor_rm " << cluster << " -forcex 1>cr_temp.stdout 2>cr_temp.stderr";
w_sleep(500);
w_sleep(10);
system(ss.str().c_str());
RunManagerPanther::close_agents();
cout << " all agents freed " << endl << endl;
Expand Down

0 comments on commit 58792a4

Please sign in to comment.