-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure that Run and Cleanup are called after Prepare #898
Conversation
@@ -430,6 +431,7 @@ nest::SimulationManager::prepare() | |||
* kernel().connection_manager.get_min_delay(); | |||
kernel().music_manager.enter_runtime( tick ); | |||
} | |||
prepared_ = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check at the top of the function that ! prepared_
and otherwise throw an exception like in the other checks.
nestkernel/simulation_manager.h
Outdated
@@ -169,7 +169,8 @@ class SimulationManager : public ManagerInterface | |||
delay to_step_; //!< update clock_+from_step<=T<clock_+to_step_ | |||
timeval t_slice_begin_; //!< Wall-clock time at the begin of a time slice | |||
timeval t_slice_end_; //!< Wall-clock time at the end of time slice | |||
long t_real_; //!< Accumunated wall-clock time spent simulating (in us) | |||
long t_real_; //!< Accumulated wall-clock time spent simulating (in us) | |||
bool prepared_; //!< indicates whether the SimulationManager has already been |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indicates whether the SimulationManager has already been
seems to be missing a word or two.
ResetKernel | ||
Cleanup | ||
} fail_or_die | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And prepare after prepare test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
An error will now be raised if
Run()
orCleanup()
are called without callingPrepare()
first.This fixes #659.