[J3] New reference BLAS NRM2 routines

Robert Corbett rpcorbett at att.net
Tue Oct 9 12:37:14 EDT 2018

I do not see that the cases you cite
are the same.  The Fortran standard
requires a conforming processor
to provide the standard intrinsic
procedures.  The Fortran
standard does not require a
conforming processor to provide
the BLAS routines.

The particular norm routines
described in the article have
properties not required by the
BLAS specification.  A program
that relies on those properties
should not assume a vendor's
implementation of the BLAS
routines will have those

Robert Corbett

> On Oct 9, 2018, at 8:32 AM, Bill Long via J3 <j3 at mailman.j3-fortran.org> wrote:
>> On Oct 9, 2018, at 10:05 AM, Robert Corbett via J3 <j3 at mailman.j3-fortran.org> wrote:
>> Portability would be an obvious
>> reason to use the reference
>> implementation.  Intel's MKL is
>> not yet universally available.
> If portability is the argument for not using the MKL versions of BLAS routines, then the whole set of intrinsics that process REAL arguments should be considered non-portable  since they normally have vendor-speific implementations.  Things like SIN, COS, GAMMA, MATMUL, …
> Cheers,
> Bill
>> 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
>> values.
>> 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
> Bill Long                                                                       longb at cray.com
> Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
> Bioinformatics Software Development                      fax:  651-605-9143
> Cray Inc./ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425

More information about the J3 mailing list