From ced9eca9e1d8b13992ea9f55cdf1b8598ab79088 Mon Sep 17 00:00:00 2001 From: Paolo Giannozzi Date: Fri, 11 Nov 2022 08:24:49 +0100 Subject: [PATCH] Misc Grimme phonon problems - Finite-q phonon calculations with DFT-D2 crash for a rather stupid reason: a printout of an unallocated variable. Quick and dirty solution. - come compilers don't like "return" in main program - make.depend updated --- Modules/mm_dispersion.f90 | 3 ++- PP/src/d3hess.f90 | 2 -- install/makedeps.sh | 8 ++++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Modules/mm_dispersion.f90 b/Modules/mm_dispersion.f90 index d96586a82..4cf9cd87d 100644 --- a/Modules/mm_dispersion.f90 +++ b/Modules/mm_dispersion.f90 @@ -281,7 +281,8 @@ MODULE london_module USE ions_base , ONLY : ntyp => nsp, atom_label => atm INTEGER :: ata ! - IF ( ionode ) THEN + IF ( ionode .AND. ALLOCATED(R_vdw) ) THEN + ! do not print anything if DFT-D2 variables not set WRITE ( stdout ,'( /, 5X, "-------------------------------------------------" , & & /, 5X, "Parameters for Dispersion (Grimme-D2) Correction:" , & & /, 5X, "-------------------------------------------------" , & diff --git a/PP/src/d3hess.f90 b/PP/src/d3hess.f90 index e2de5a791..95cfca139 100644 --- a/PP/src/d3hess.f90 +++ b/PP/src/d3hess.f90 @@ -209,6 +209,4 @@ program d3hess ! CALL stop_pp ! - return - ! end program diff --git a/install/makedeps.sh b/install/makedeps.sh index 90ca897ef..ce1c2b08f 100755 --- a/install/makedeps.sh +++ b/install/makedeps.sh @@ -80,11 +80,15 @@ for dir in $dirs; do atomic/src | GWW/gww ) DEPENDS="$DEPEND2" ;; PW/src | CPV/src ) - DEPENDS="$DEPEND2 ../../KS_Solvers/Davidson ../../KS_Solvers/CG ../../KS_Solvers/PPCG ../../KS_Solvers/ParO ../../KS_Solvers/DENSE ../../KS_Solvers/RMM ../../dft-d3" ;; + DEPENDS="$DEPEND2 $LEVEL2/KS_Solvers/Davidson $LEVEL2/KS_Solvers/CG $LEVEL2/KS_Solvers/PPCG $LEVEL2/KS_Solvers/ParO $LEVEL2/KS_Solvers/DENSE $LEVEL2/KS_Solvers/RMM $LEVEL2/dft-d3" ;; KS_Solvers/Davidson | KS_Solvers/Davidson_RCI | KS_Solvers/CG | KS_Solvers/PPCG | KS_Solvers/ParO | KS_Solvers/DENSE | KS_Solvers/RMM ) DEPENDS="$DEPEND3" ;; - PW/tools | PP/src | PWCOND/src | GWW/pw4gww | NEB/src ) + PP/src ) + DEPENDS="$DEPEND2 $LEVEL2/PW/src $LEVEL2/dft-d3" ;; + PW/tools | PWCOND/src | GWW/pw4gww | NEB/src ) DEPENDS="$DEPEND2 $LEVEL2/PW/src" ;; + PHonon/PH ) + DEPENDS="$DEPEND2 $LEVEL2/PW/src $LEVEL2/LR_Modules $LEVEL2/dft-d3" ;; PHonon/FD | PHonon/PH | PHonon/Gamma | HP/src | TDDFPT/src | XSpectra/src | GIPAW/src | KCW/src ) DEPENDS="$DEPEND2 $LEVEL2/PW/src $LEVEL2/LR_Modules" ;; KCW/PP )