shadow icon indicating copy to clipboard operation
shadow copied to clipboard

End simulation if all hosts finish execution

Open robgjansen opened this issue 7 years ago • 1 comments

If all hosts finish running their processes and have no future processes to start, we can stop the simulation (even if it is before the configured stop time).

  • at start-up, compute min process start time across all processes
  • during heartbeat, check if current time is after min process start time
  • if yes, we know that no more processes will start
    • check number of running processes
    • if 0, set kill time to now

robgjansen avatar Nov 16 '17 19:11 robgjansen

Once the per-process expected_final_state property is merged, it might make sense to do this when all processes that are expected to exit have exited. e.g. for simulations that have servers that run forever, but clients that do a fixed amount of work and then exit.

We'd want to think about how this interacts with shutdown_signal. e.g. maybe we'd fire all the shutdown_signals immediately when we decide we're shutting down early, but then keep simulating until either all processes have actually exited, or we've reached the original static end_time

sporksmith avatar May 02 '23 21:05 sporksmith