[ODE] ODE spatial inconsistency

Jon Watte (ODE) hplus-ode at mindcontrol.org
Wed Jun 20 23:29:30 MST 2007

ODE has been made fully deterministic in the past. I suggest you search 
the mailing list archives for what you need to do.
In brief:
1. There is a random number generator for permuting the matrix in the 
fast solver that needs to be consistently seeded.
2. The rounding mode of the CPU needs to be consistent (this is the x87 
control word)
3. The register size mode of the CPU needs to be consistent (this is 
also in the x87 control word)
4. All objects, geoms, and queries need to be introduced into the system 
in a consistent ordering.
Note that certain libraries and signal handlers will change those modes 
on you, so your best bet is to test and reset if necessary before you 
start your collision/step, each time.

Btw: rounding does not "fix" divergence errors, it just masks them. Once 
in a while, that last bit will go the other way, and suddely you've 
introduced an even bigger error by doing the rounding.


             / h+

Marcin Pilat wrote:
> Hmm... I think I came up with a solution.
> But first, a question: what is the error on an ODE step?
> It seems that using a step of 0.01, the error is about 1.0e-6, so if  
> after every step I take, I round off all the positions and  
> orientations of all my bodies to 1.0e-6, the simulation (at leas the  
> test one) produces consistent results.  I always assumed that the  
> error of ODE is the dEpsilon value, but that is e-12 with double  
> precision.
> Which brings me to my second question, if the error is so high, why  
> not make ode round off the error so that the behaviour of the engine  
> is consistent?
> Any thoughts?

More information about the ODE mailing list