coin-or-tools / BuildTools

Macros and patches for GNU autotools
https://coin-or-tools.github.io/BuildTools/
Other
3 stars 7 forks source link

Lapack hangs in dlamc1 if in optimized build #66

Closed svigerske closed 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: @svigerske

Original creation time: 2008-05-24 15:54:52

Assignee: @andrea5w

Version: 0.5

Hi,

in some cases, CBC (2.1 stable) and SCIP (1.0; using Clp as LP solver) hang in the Lapack routine dlamc1 if I have compiled in optimized mode (i.e., default).

The compiler is a GCC 4.2.1, the machine a Intel Core2 Duo.

John pointed me to this ticket in the Octave mailing list. I followed the suggestions there and the problem went away when I added -ffloat-store to the FFLAGS.

Should this flag be added per default (when gcc is used), at least for dlamch.f ?

Best, Stefan

PS: This is from the gcc manual on what -ffloat-store is doing:

Do not store floating point variables in registers, and inhibit other options that might change whether a floating point value is taken from a register or memory.

This option prevents undesirable excess precision on machines such as the 68000 where the floating registers (of the 68881) keep more precision than a "double" is supposed to have. Similarly for the x86 architecture. For most programs, the excess precision does only good, but a few programs rely on the precise definition of IEEE floating point. Use -ffloat-store for such programs, after modifying them to store all pertinent intermediate computations into variables.

svigerske commented 5 years ago

Comment by @andrea5w created at 2009-02-23 15:27:16

Resolution: fixed