[ODE] floats/doubles

skjold@cistron.nl skjold at cistron.nl
Wed Feb 12 18:19:02 2003


Hi,

I had similar problems at one time. This might seem trivial, but it's possible: Did you forget to recompile the ODE library using single precision? It's not enough to just recompile your own application, you should recompile it with the same setting (single/double precision) as your own application.

Greets,
Mark


> Hi ODE list
> 
> Ive implemented ode into a rudimentary engine i created, and i just used the default settings for a while with double prescision. So now i wanted to test how much performance i would get when compiling with single prescision instead. But the problem is that it simply doesnt run anymore. I dont do any "illegal" conversions between my internal numbers and dReals. Only an occational pos.x = (float) pos[0] and simple stuff like that.
> I know the problem can be anywhere in my program and might not have anything to do with ODE, but has anyone experienced similar problems?
> I get some warnings when i compile, but none that i would consider dangerous.
> 
> My app seems to start up, and runs very slow using a LOT of time in the ODE simulate code. 25ms or more.  (it ran less than 8 in double prescision mode) (800mhz pIII). All my models are gone (probably off to infinity) and the program seems to crash on the strangest places where it really shouldnt crash.
> 
> Any ideas?
> 
> Thanks.
> Tobias Thorsen
> www.spacetimefoam.com
>