[J3] New reference BLAS NRM2 routines

Robert Corbett rpcorbett at att.net
Tue Oct 9 11:05:03 EDT 2018

Portability would be an obvious
reason to use the reference
implementation.  Intel's MKL is
not yet universally available.

The particular feature of this
implementation is that it sums
the values using Kahan's
compensated addition algorithm,
which mitigates round-off error.
If all of the numbers being summed
are of similar magnitude, the result
should be close to the true sum.
I do not know that Intel's MKL offers
such a routine.

There is a spectrum of
compensated arithmetic routines,
of which Kahan summation is
among the simplest and most efficient.  Other such routines produce more accurate results in
more cases, but at greater cost.
At the other end of the spectrum
are the super-accumulator routines,
which produce correctly rounded results regardless of the input

Robert Corbett

> On Oct 9, 2018, at 7:38 AM, Steve Lionel via J3 <j3 at mailman.j3-fortran.org> wrote:
>> On 10/9/2018 10:31 AM, Robert Corbett wrote:
>> I still find the authors' claim dubious.
>> They claim adding the option fp:precise fixed the problem.
>> Would the option fp:precise make
>> the compiler respect parentheses?
> That option disables a lot of optimizations, so it would not astonish me if that were among them.
> Of course, Intel provides highly optimized and carefully coded BLAS routines in its MKL, similar to most HPC vendors. It's not clear to me why one would care about "reference" routines. (I did not read the article.)
> Steve

More information about the J3 mailing list