You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In fixed_step_algorithm::impl::do_step() we loop over all simulators and call their individual do_step() functions, storing the resulting future<step_result> objects in a container. We then loop over all simulators again, call get() on the aforementioned futures, and transfer their outgoing values.
However, in the process of transferring, we not only call the current simulator's get_xxx() functions, we also call other simulators' set_xxx() functions. We can't do that, because we may not have gotten around to calling future<step_result>.get() for some of those simulators yet, and then we don't know that their do_step() has completed.
The solution is to get all the step_results before transferring variables. Also, some asserts should be sprinkled around slave_simulator to prevent this from going unnoticed in the future.
The text was updated successfully, but these errors were encountered:
In
fixed_step_algorithm::impl::do_step()
we loop over all simulators and call their individualdo_step()
functions, storing the resultingfuture<step_result>
objects in a container. We then loop over all simulators again, callget()
on the aforementioned futures, and transfer their outgoing values.However, in the process of transferring, we not only call the current simulator's
get_xxx()
functions, we also call other simulators'set_xxx()
functions. We can't do that, because we may not have gotten around to callingfuture<step_result>.get()
for some of those simulators yet, and then we don't know that theirdo_step()
has completed.The solution is to get all the
step_result
s before transferring variables. Also, someassert
s should be sprinkled aroundslave_simulator
to prevent this from going unnoticed in the future.The text was updated successfully, but these errors were encountered: