Subject: Re: CCL:the Pentium FDIV bug

From: [email-masked] (Graham Hurst)
Date: Wed, 30 Nov 94 13:47:15 -0500

Bruce E. Wilson <[email-masked]> writes (in response to my post):

> Thanks, Graham, for a reasonable evaluation of the implications of
> the Pentium bug in a practical application.  The question I'd worry
> about more than MD or semi-empirical methods would be ab initio
> calcs.  In MD or semi-empirical, the numbers come back in rational
> units, where a difference out several significant figures is well
> past the practical utility of the method.  ab initio methods generate
> energies in atomic units, so one is often faced with the issue that
> the energy differences of interest start in the fifth or sixth
> significant digit.  Even then, an error out in the 12th or 13th
> digit is of comparatively small importance, but if it moves much
> in from there, I'd start to be concerned.  Has anyone done the sort
> of analysis on ab initio calcs with a buggy Pentium that Graham 
> mentions for MD?  Tx.
> 
>                         Bruce E. Wilson ([email-masked])
>                         Eastman Chemical Company

You're welcome!

Actually units per se are irrelevent (since they are simply scaling
factors) and one is typically interested in energy differences in the
fifth or sixth digit with semi-empirical calculations as well.  I do
agree that, because of explicit core electrons and two-electron
integrals, an ab initio calculation will do orders of magnitude more
divisions than an equivalent semi-empirical calculation.

In ab initio calculations, most of the floating point divisions occur
in the calculation of integrals (mostly two electron), and though I
don't have specific results for buggy Pentiums doing ab initio calculations,
I do have some experience in errors resulting from imprecision in
ab initio integrals.

In my earlier life as an ab initio chemist, I wrote some pipelined FPS
assembler code to pack two-electron integrals to a fixed point accuracy.
All integrals were truncated with rounding to the integral cutoff,
thus if the integral cutoff was 1E-9, then the bits of the mantissa
less than 1E-9 were thrown away.  The remaining variable-length
mantissa bits were were packed into words (lots of shifts and or's!),
resulting in packing factors of 0.2 to 0.4 (depending on the cutoff).
Details are in Hurst & Dupuis, J. Comp. Chem. 9:148-157 (1988).

What does this shameless self promotion have to do with the pentium bug?

Well this effectively introduced a known (and definable) imprecision into 
*every* two-electron integral (including those discarded), and I measured
this effect on some sample calculations.  The details are in the paper, but
in general total energies differed less than two orders of magnitude
(in atomic units) more than the integral imprecision (compared to the
same cutoff without the integral compression).  For imprecision less
than 1E-8 for all integrals, geometry optmization results were identical
for seven printed decimal places (Angstroms and degrees).

Thus if imprecision in *every* integral at the eighth decimal place
(in atomic units) gives total energies differing in the 7th or 8th
decimal place, I think that the one in eight billion chance of getting
and imprecise divide on a Pentium while calculating integrals is not
cause for concern.  Though the correspondence isn't strict, I think
this gives an idea for an upper bound on the effect of the pentium
bug in ab initio calculations.

Of course quantum chemistry is like weighing a ship's captain by weighing
the ship with and without the captain (I wish I could remember who said
that), but I think that the pentium bug is like having a fly around the
captain!  Most of the time it won't make any difference (when the fly is
flying) and when it does (when the fly lands briefly) the difference
is almost imperceptible!

By the way, Intel will replace your chip if you are doing floating-point
intensive calculations.  I had no trouble convincing them that HyperChem
was such an app (though they informed me that the pentium also had
improved accuracy for transcendentals which could cause differences from
486 results) and they added it to their list of apps that warranted
high priority (but of course not immediate!) replacement.

Sorry for the bandwidth...

Graham
------------
Graham Hurst ([email-masked])
Hypercube Inc, 7-419 Phillip St, Waterloo, Ont, Canada N2L 3X2 (519)725-4040
Info requests to: [email-masked]    Support questions to: [email-masked]
Email group: Send "subscribe hyperchem" to [email-masked]