[Coin-lpsolver] CBC performance in Linux vs Windows

Baudrillard, Gilles gilles.baudrillard at eads.net
Thu Oct 26 07:55:40 EDT 2006


Lou Hafer wrote:
> Vishnu,
<stripped >

> in full exploration of an unproductive portion of the search tree.  To
> coin an
> oxymoron, there's a sort of deterministic randomness.  The behaviour is
> repeatable on a given platform, but will vary (apparently randomly)
> between 
> platorms.

<stripped>

On x86-32 platforms, the FPU has 80 bits-wide registers
(with a 64 bits mantissa), which is different from the memory format
(64 bits with 53 bits mantissa ,including 1 implicit bit)

  In Linux, the default settings of the FPU rounding mode is to keep the
full 80 bits for the results of operations between registers, while in 
Windows, the FPU rounding mode is set to keep only 64 bits (ie round 
mantissa to 53 bits  and setting the low 11 bits (of the 80) to 0).
Storing to memory of course always round things from 80 bits to 64 bits.

So the operations involving only register variables are made with
greater precision on Linux than on Windows (or than on any hardware
platform that has pure 64 bits precision -- sparcs, etc...) and that 
makes things diverge quite quickly on codes like (MI)LP.

In my experience, LP codes run better with the linux settings.

Note that setting the FPU rounding mode to 64 bits under Linux will
note guarantee complete reproducibility with a pure 64 bits platform,
because the exponent inside the 80-bits register is still 16 bits wide
instead of 11 bits for a standard 64 bits proc. So very tiny numbers
can be zero on one platform and non-zero on others, which can
change the results of some tests.

And different compilers can also reorganize differently arithmetic 
expressions at some levels of optimization ...

Gilles




More information about the Clp mailing list