Hello,
I have a problem with the results that drotmg / srotmg occasionnaly produce.
I installed ATLAS on Ubuntu (and it performs nicely in terms of speed, more or less the same as Matlab).
I installed LAPACK from Netlib, providing it with ATLAS BLAS.
In the BLAS tests supplied by LAPACK, one of the tests for drotmg (and one for srotmg) failed.
I will only talk about drotmg in what follows.
The test uses the following input (#0):
6e-10 2e-2 1e5 10 0 0 0 0 0
The expected output is (#1):
0.00754975 0.015 32.5521 10 -1 0.000244141 -0.0001 0.813802 1
The ATLAS output is (#2):
2.12506e+12 0.015 1.94026e-06 10 -1 1.45519e-11 -0.0001 4.85064e-08 1
And this discrepancy triggers the LAPACK BLAS Level 1 tester to report an error.
Mathematically both outputs above are the same if one applies the scaling. However, in case (#2) the scaling d1 = 2.12506e+12, which is greater than gamma^2 = 4096^2 = 1.68e+7. The value of d1 looks a bit extreme I would say.
The condition to keep scaling within the limits 1/gamma^2 <= |di| <= gamma^2 is mentioned e.g. in [1]. The code in drotmg.f uses the same value for gamma.
To do a bit more testing, I wrote a simple C code that does nothing more than calling drotmg with the input (#0). Also, I took drotmg.f (ATLAS/src/blas/f77reference/drotmg.f) and compiled it to drotmg.o (a few warnings "Deleted feature: ASSIGN statement" emerged though).
When linking my simple C code with this compiled drotmg.o, the output (#1) is produced.
However, linking the C code with -lf77blas -latlas results in output (#2).
So, finally, the question is:
Is this the intended behaviour of drotmg / srotmg in ATLAS, or an error?
[1] Hopkins, T., 1999 Restructuring the BLAS Level 1 Routine for Computing the Modified Givens Transformation
Best Regards,
Ilya Fursov
ATLAS drotmg should work like the reference BLAS, within the bounds of fp arithmetic. If it fails the BLAS tester, then "make check" from ATLAS BLDdir should fail. Does it for you?
Can you post your Make.inc, so I can see the architecture info?
Also, please post your simple C code tester, so that I can try to duplicate the problem.
Thanks,
Clint
Take attached tester, and from BLDdir/bin:
and indeed ATLAS is wildly different
Ticket moved from /p/math-atlas/support-requests/1027/
Also, if you replace ATLAS/interfaces/blas/F77/testing/?blat1.f with those from lapack-3.5.0, then make check fails tester.
I notice that all of the testers have changed. May be worth updating ATLAS's testers to the more modern lapack ones, under the assumption that they have been extended to find more cases.
To fix, save the file below to ATLAS/src/blas/level1, then in BLDdir/src/blas/level1 issue "make lib".
Fixed in 3.10 basefiles, still must be fixed in 3.11.
fixed in basefile, can close with release of 3.11.41.