[ODE] Different behaviors with different C++ compilers

Chris Jefferson caj at cs.york.ac.uk
Wed Jul 2 11:12:02 2003


Steffen Wischmann wrote:

> Hi,
> 
> I ran my simulation (Creature with NN Controller) on two differnt linux 
> distribution, one with the gcc compiler ver. 3.2-36, the other one with 
> ver.  2.95.3-52. I'm using ode 0.035 on both machines.
> If I compile the code with the older compiler, and copy the compiled 
> code to the machine with the newer compiler version, I got exactly the 
> same behavior. But if I compile the same source code again with the 
> newer compiler version, the behavior is different.
> 
> Does anybody know something about that?
> 

The improved optimiser probably re-arranged some instructions, and 
possibly changed when things are read from / written to registers (which 
can make a difference with floating point numbers). This is unavoidable 
I'm afraid (it can be improved by using no optimisation)

Chris