Page 1 of 1

LAPACK SSYEVD failes to evaluate matrix

PostPosted: Mon Feb 03, 2014 3:42 pm
by allamsridevi
LAPACKE_ssyevd fails to evaluate a matrix. LAPACKE_ssyev solves the problem. The code to reproduce the issue is attached.
MKL Engineers did some investigation and the Netlib LAPACK SSYEVD with netlib BLAS is also unable to solve the problem. The failure is due to the algorithm nature and since single precision is chosen and they recommended to use the double precision DSYEVD or single precision SSYEV since the QR algorithm used in xSYEV is more reliable than the divide and conquer approach used by the xSYEVD LAPACK interfaces.

The SYEVD routine has to be adjusted to be robust. Random failures of any method is not an acceptable thing. The SYEVD is a faster way to perform Singular Value Decomposition and therefore is very important.
We developed a reproducer (reproducer.zip) for original SSYEVD LAPACK interface and the test fails with all MKL builds:
build the Netlib LAPACK and BLAS binaries with -O0 by gfortran and ifort compiler and the test also fails for all possible combinations

$ ifort -O0 test_ssyevd.f liblapack.a librefblas.a

$ a.out
lacke 6841 6841
size of iwork 288 288
info 86

$ gfortran -O0 test_ssyevd.f liblapack.a librefblas.a
$ a.out
lacke 6841 6841
size of iwork 288 288
info 86

Re: LAPACK SSYEVD failes to evaluate matrix

PostPosted: Mon Feb 03, 2014 6:24 pm
by allamsridevi
Attaching the reproducer.zip (as the limit for No. of attachments in the Original Post was #3)

Re: LAPACK SSYEVD failes to evaluate matrix

PostPosted: Tue Oct 07, 2014 2:39 pm
by osni
The bug has been traced to slaed6, which computes the root closest to the origin of a secular equation and is used in the D&C tridiagonal eigensolver (sstedc) and D&C least squares solver (sgelsd). The bug was due to the use of too stringent tolerance in the test for convergence in line 390, which has been modified to

390 IF( ( ABS( F ).LE.FOUR*EPS*ERRETM ) .OR.
391 $ ( (UBD-LBD).LE.FOUR*EPS*ABS(TAU) ) )
392 $ GO TO 60

Osni

Re: LAPACK SSYEVD failes to evaluate matrix

PostPosted: Fri Nov 07, 2014 7:22 pm
by Developer2014
Thank you for looking into this issue. Does the fix make LAPACKE_ssyevd able to solve any matrix (assuming there are no overflows)? In what version of Intel MKL is the fix available?

Re: LAPACK SSYEVD failes to evaluate matrix

PostPosted: Wed Mar 11, 2015 11:28 pm
by admin
Just to let you know that the bug you reported has been corrected in rev 1505 on Oct 1st 2014.
See http://www.netlib.org/lapack/Errata/index2.html

The bug fix will be released in the coming LAPACK release. At the moment, it is available in our SVN repository.

In what version of Intel MKL is the fix available?
Best, would be to ask directly the MKL team.