From 3e80cd4f07352f6cf0921ddaca1cc03e912e23dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flaviano=20Jos=C3=A9=20dos=20Santos?= Date: Wed, 27 Jan 2021 11:32:39 +0100 Subject: [PATCH] Improved warning message for Newtons minimization failure. --- PW/src/efermig.f90 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/PW/src/efermig.f90 b/PW/src/efermig.f90 index c5ef003d1..b59a295b3 100644 --- a/PW/src/efermig.f90 +++ b/PW/src/efermig.f90 @@ -52,10 +52,6 @@ FUNCTION efermig( et, nbnd, nks, nelec, wk, Degauss, Ngauss, is, isk ) !! Function to compute the number of electrons for a given energy !! Function to compute the first derivative of the number of electrons !! Function to compute the second derivative of the number of electrons - REAL(DP), EXTERNAL :: wgauss, w0gauss, w1gauss - !! Function to compute the occupation - !! Function to compute the distribution function ( smearing delta) - !! Function to compute the first derivative of the distribution function INTEGER :: i, kpoint, Ngauss_ INTEGER :: info, maxiter_aux ! @@ -146,10 +142,7 @@ FUNCTION efermig( et, nbnd, nks, nelec, wk, Degauss, Ngauss, is, isk ) efermig = ef IF (is /= 0) WRITE(stdout, '(5x,"Spin Component #",i3)') is - WRITE( stdout, '(5x,"Warning: Final Fermi energy from Bisection using the inputted smearing (M-P or cold)"/ & - & 5x,"Ef (eV) = ",f15.6," Num. electrons = ",f10.6," electrons")' ) & - Ef * rytoev, num_electrons(Ef) - WRITE( stdout, '(5x, a)' ) "Warning: I's possible that your 'degauss' is too large!" + WRITE( stdout, '(5x,"Minimization algorithm failed to find Fermi energy: reverting to bisection. Probable cause: smearing is larger than the electronic band-gap.")' ) end if 98765 continue