Bug#694625: libblas3gf: DGEMV does not handle properly N=0

Christophe TROESTLER Christophe.Troestler at umons.ac.be
Wed Nov 28 14:05:45 UTC 2012


Package: libblas3gf
Version: 1.2.20110419-5
Severity: important

Dear Maintainer,

The routine DGEMV (with TRANS = 'N') is supposed to perform the
operation

    y ← beta * y + alpha * A * x

where the matrix A has dimensions M×N.  In particular, if N=0 (and M >
0), A * x is the null vector (all elements are given by sums on an
empty set of indices).  Consequently, if N = 0, the operation should
be

    y ← beta * y

and NOT leave y untouched.  For your convenience, I have attached a
program demonstrating the latter (wrong) behavior.
   

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (900, 'testing'), (400, 'unstable'), (300, 'stable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.6.6 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libblas3gf depends on:
ii  libblas3  1.2.20110419-5

libblas3gf recommends no packages.

libblas3gf suggests no packages.

-- no debconf information
-------------- next part --------------
      Program test_gemv
      Implicit none

      Real*8 A(2,2)
      Real*8 X(2), Y(2), beta

      A(1,1) = 1.
      A(1,2) = 1.
      A(2,1) = 1.
      A(2,2) = 1.

      Y(1) = 1.
      Y(2) = 2.
      beta = 2.

c     Should perform: Y <- beta * Y (empty sums in the matrix product)
      call DGEMV('N', 2, 0,  0., A, 2,  X, 1,  beta, Y, 1)
      
      write(*,*) Y(1)
      write(*,*) Y(2)

      end
c$$$Local Variables:
c$$$compile-command: "gfortran -o test_gemv test_gemv.f -lblas"
c$$$End:


More information about the debian-science-maintainers mailing list