Open rmm-fcul opened 9 years ago
Note: monitoring the CPU and/or memory usage do not provide a direct indication of when slowdown is occurring, so the bluntest tools aren't sufficient to provide a warning.
I think direct access to the simulation clock, vs. system real-time clock will indicate when slowdown occurs, as well as allowing it to be quantified.
I have implemented a check on real time versus simulated time. Every n seconds of simulated time, I divide the elapsed real time by n. If the resulting value is bigger than t, the assisi playground prints a message to standard error. There is also an python call to obtain the simulated time (since playground launch). Check the monitor branch.
@rmm-fcul Can you confirm that Pedro's fix satisfies your requirements? If yes, we can close this.
The solution (3) is fine, although a bit clearer documentation in the --help would be useful. (i.e. state the units). Solution (2) is great - I missed it until today so haven't tested with any other timing code but it corresponds fine to what is displayed on the enki main window.
For (2), I actually don't see how to do more formal tests than a visual comparison. Please advise if this is not sufficient
One minor tweak I made in (3) is in extensions/ExtendedWorld.cpp, line 111 from std::cerr << "elapsed: " << elapsed.wall to std::cerr << "elapsed: " << elapsed.wall << " (" << absoluteTime << "s elapsed)"
since the variable elapsed.wall
is not a readable number (11 digits -- don't know what it corresponds to directly either).
@plsm could we incorporate some improved output messages that are more readable, and then we can close this issue?
I will check the units in type boost::timer::cpu_times
in order to improve output messages.
With large numbers of bees and/or CASUs, I experience a slowdown of simulation time. However, this is at present unquantified.
Can we implement a simple method that provides the user with what the current simulation speed is?
Some potential implementation routes (not prescriptive, if an alternative is easier):
(for (3), the minute and 5% should be parameters of course)