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

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

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

Postby Boris_MV » Wed Aug 17, 2016 4:51 pm

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!!
Posts: 7
Joined: Fri Dec 19, 2014 9:39 pm

Return to Algorithm / Data

Who is online

Users browsing this forum: Bing [Bot] and 2 guests