Re: possible integration problem with v5.1 and v5.2

Frederic Y. Bois <[email protected]> Mon, 22 Sep 2008 09:34:42 +0000 (UTC)
Newsgroups gmane.comp.gnu.mcsim.bugs
Message-ID <[email protected]>
Frederic Y. Bois <frederic.bois <at> ineris.fr> writes:

> 
> You may encounter problems when integrating a set of differential equations: 
> with a very dense scheduling of output or input function discontinuities, 
> the integrator may get stuck at a stopping point and does not advance past it. 
> This seems to happen only when the code is compiled with the optimization 
> option on ...


The problem mentioned on my March 25, 2008 message comes from the fact that 
registers in some systems are slightly more larger than doubles in memory. 
Compiled code moves values between memory and floating point registers at its 
convenience, and moving them into memory truncates them. 

One way to fix the problem (I checked that it works) is to compile the MCSim
library (i.e. the content of the sim/ directory) with the "-ffloat-store" 
option.

The code may run a bit slower though, but at least it runs correctly.

Frederic