Hello BLAS/LAPACK people
I think I have found an error in the reference implementation of DGEMV.
The error appears in case N = 0 and BETA != 1.0. The following simple
program demonstrates the error
PROGRAM TEST
DOUBLE PRECISION A(3,0),X(0),Y(3),ALPHA,BETA
DATA Y/1.0,2.0,3.0/
DATA ALPHA/1.0/
DATA BETA/2.0/
WRITE (6,*) 'Before: Y = [',Y(1),',',Y(2),',',Y(3),']'
CALL DGEMV('N',3,0,ALPHA,A,3,X,1,BETA,Y,1)
WRITE (6,*) 'After: Y = [',Y(1),',',Y(2),',',Y(3),']'
END
Before calling DGEMV, we obviously get Y = [1.0, 2.0, 3.0], whereas I
would expect Y = [2.0, 4.0, 6.0] after. However the test shows that Y is
unchanged.
Looking into the reference implementation of DGEMV it seems that N = 0
always causes a quick return, which I think is an error in case BETA !=
1.0. The problem is also present in the routine DGBMV, and of cause in
the corresponding single precision versions.
Thank you for doing such a wonderful job on linear algebra. This highly
appreciated and very useful.
Best regards
Erik Nim
Erik Nim
Garrad Hassan Denmark ApS
Pakhusvej 3, 1st Floor, DK-8382 Hinnerup, Denmark
Tel: +45 87 65 61 11 / Fax: +45 87 65 61 13 / Mobile: +45 21 65 61 08
www.garradhassan.com
This email is issued subject to the Garrad Hassan email disclaimer
statement. Please refer to http://www.garradhassan.com/disclaimer
Garrad Hassan & Partners Ltd is registered in England (1878456) and has
its registered office at St Vincent's Works, Silverthorne Lane, Bristol,
BS2 0QD, UK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20100106/4cd35f05/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2699 bytes
Desc: image001.gif
Url :
http://lists.eecs.utk.edu/mailman/private/lapack/attachments/20100106/4cd35f05/attachment.gif
|