PropagatorsParallelizer has side effects on underlying propagators
PropagatorsParallelizer
is intended to run propagators without the underlying propagators noticing they are managed from outside. It sometimes fails to be transparent enough, which introduces difficult bugs.
In order to know which propagator should run and which should be blocked, PropagatorsParallelizer
calls the propagators interpolators, but these interpolators may be used by the raw propagator itself, so they are really called for multiple threads.
The first problem is that when propagators interpolators are evaluated, they do some regular interpolation and then they add the various additional states. Up to version 11.0.2, it involved static states and states manages by AdditionProviders, and as part of solving issue #856 (closed), it also involves integrable states. These states call user-defined callbacks, and these callbacks may not behave properly in multi-thread environment.
The second problem is that the interpolators restrictStep
method is called from both PropagatorsParallelizer
and the propagator (for example when handling events), and here again this does not work well in multi-thread contexts.
This is a difficult problem.