[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ccp4bb]: REFMAC5 under CCP4 4.1

***  For details on how to be removed from this list visit the  ***
***    CCP4 home page http://www.dl.ac.uk/CCP/CCP4/main.html    ***

>>>>> "GM" == Garib Murshudov <garib@ysbl.york.ac.uk> writes:

 GM> Here is very small program wich behaves differently with -O2
 GM> (result 6 1) and -O0 (result 6 6). This type of code may be seen
 GM> everywhere

That doesn't mean that it's good code.  The g77 manual has discussion
and useful references about floating-point arithmetic, particularly
the perils of the x86 architecture and floating-point comparisons.

However, the result above does look like a code generation bug.  The
`submodel' defaults with which the compiler was built (see the SPECS
file) could affect this unless you specify -mcpu and -march, at least.

Using -O0 can easily give you an order of magnitude speed hit, but
there are various handles to turn individual optimizations on and off.

 GM>  (red hat version 7.0, gcc 2.96 g77 0.5.24)

Damn RedHat.  <URL:http://gcc.gnu.org/gcc-2.96.html> (and the last
released version of g77 was 0.5.25).  Get a packaged version of GCC
2.95.2 or build it from scratch, which is easy.

[I recommend Debian GNU/Linux for various reasons, even though they
don't clearly label things in the distribution like GCC as somewhat
modified versions (sigh).]