From 27bf0b030bf97c886de1350a5c58dc6e03085711 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Wed, 28 Feb 2018 14:13:05 -0600 Subject: [PATCH] Dequeue timed-out runs if the slave later returns Fixes #569 --- .../MonteCarlo/MonteCarlo_funcs.cpp | 25 ++++++------------- .../MonteCarlo/MonteCarlo_receive_results.cpp | 9 ++++++- .../MonteCarlo/MonteCarlo_slave.cpp | 8 +++--- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/trick_source/sim_services/MonteCarlo/MonteCarlo_funcs.cpp b/trick_source/sim_services/MonteCarlo/MonteCarlo_funcs.cpp index 107ae65d..c6597608 100644 --- a/trick_source/sim_services/MonteCarlo/MonteCarlo_funcs.cpp +++ b/trick_source/sim_services/MonteCarlo/MonteCarlo_funcs.cpp @@ -397,24 +397,15 @@ Trick::MonteRun *Trick::MonteCarlo::get_next_dispatch() { /** */ + if (in_range(curr_run)) { return curr_run; + /**
  • Otherwise, run the pre run jobs and dequeue it. */ + } else { + if (verbosity >= ALL) { + message_publish(MSG_WARNING, "Monte [Master] Run %d is out of range and has been skipped.\n", curr_run->id) ; + } + prepare_run(curr_run); } } return NULL; diff --git a/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp b/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp index 613889c2..998ff55c 100644 --- a/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp +++ b/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp @@ -81,7 +81,14 @@ void Trick::MonteCarlo::handle_run_data(Trick::MonteSlave& slave) { } /** - *