[Pw_forum] How to figure out machine accuracy

Manoj Srivastava manoj at phys.ufl.edu
Fri Sep 4 15:54:38 CEST 2009


Dear PWSCF users and developers, 
 I am wondering how can one find machine accuracy? I am having
some symmetry problem, and for that I want to solve eigen value
problem with the best accuracy. In the lapack library it says-
ABSTOL  (input) DOUBLE PRECISION
*          The absolute error tolerance for the eigenvalues.
*          An approximate eigenvalue is accepted as converged
*          when it is determined to lie in an interval [a,b]
*          of width less than or equal to
*
*                  ABSTOL + EPS *   max( |a|,|b| ) ,
*
*          where EPS is the machine precision.  If ABSTOL is less than
*          or equal to zero, then  EPS*|T|  will be used in its place,
*          where |T| is the 1-norm of the tridiagonal matrix obtained
*          by reducing A to tridiagonal form.
*
*          Eigenvalues will be computed most accurately when ABSTOL is
*          set to twice the underflow threshold 2*DLAMCH('S'), not zero.
*          If this routine returns with INFO>0, indicating that some
*          eigenvectors did not converge, try setting ABSTOL to
*          2*DLAMCH('S').

the last paragraph is useful. so i looked up DLAMCH-
  DOUBLE PRECISION FUNCTION DLAMCH( CMACH ) 
 The input is CMACH, I can specify various input variables for 'CMACH' to
get output, but what variable is returned as output, as there is only one
in this subroutine?  Would you mind having a look at this- its in
espresso4.0.4/flib/dlamch.f

espresso4.0.4 can be replaced by whatever version you are using. 

Regards, 
Manoj Srivastava
University of Florida
Gainesville, USA



More information about the Pw_forum mailing list