Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: bugs in intel compiler

Author: Bo Persson

Date: 06:47:45 08/07/03

Go up one level in this thread


On August 07, 2003 at 08:13:09, Vincent Diepeveen wrote:

>Hello,
>
>exactly this i had noticed too. not the solution though. perhaps some of you
>might get helped by it for your software in case you use intel c++:
>-----------
>Name: redpriest (redpriest@alum.wpi.edu) 8/5/03
>
>...but it isn't really. Sometimes it produces correct results. It just needs you
>to look at the results and ensure they are correct, disable if necessary.
>There is definite proof of what *can* happen. I built a ScienceMark binary and
>the results were seemingly impressive.... until I checked the results. They were
>completely incorrect.
>
>A possible issue here is that the Intel compiler has the /Op option OFF by
>default. With this off, fp results are much faster but they lose precision and
>generate weird errors further down the line. This happened to me. With /Op on,
>the compiler was no faster than say, the MSVC 6.0 SP5 compiler with /Op on.
>
>/Op appears to be the *default* setting for the Microsoft compiler. /Op off
>appears to be the *default* setting for the Intel C compiler.
>

This is not a bug, but by design.

Floating point calculations are faster when the values are kept in the fp
registers. To be totally compliant with the IEEE fp format, each value should be
rounded to 64 bits between each operation and not be kept at 80 bits. It is no
surprise that rounding makes it slower.

The faster results are generally not at a *lower* precision, they are just
unpredictable, because there is no way to tell exactly which intermediate
results have 80 bit precision and which have 64 bit precision. It all depends on
what optimizations happend for a specific program version.


Everything is documented of course, so you can choose if you want faster or
highly repeatable calculations. It has been this way since the 8087 was
introduced, 25 years ago...



Bo Persson
bop2@telia.com



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.