Page 1 of 1

LAPACKE_zheevx: How to set ABSTOL=2*DLAMCH('S') in C++

PostPosted: Wed Aug 17, 2016 4:51 pm
by Boris_MV
This is a question about setting proper tolerance ("abstol") for convergence of eigenvalue calculation with LAPACKE_zheevx() function in C++.

For a particular input Hermitian matrix, LAPACKE_zheev() fails to converge when calculating eigenvalues/eigenvectors with the default value of "abstol" (i.e. abstol=-1). In that case, the LAPACK manual says to set abstol=2*DLAMCH('S'). However, DLAMCH is Fortran function and I use C++ which does not recognize it as a valid C++ function. Could anyone please help me how to properly set "abstol=2*DLAMCH('S')" when using LAPACK with C++ (i.e. when using LAPACKE)?

Thanks very much in advance!!