From 145b42cd2631eb537c7858a3d1f220d64be308cf Mon Sep 17 00:00:00 2001 From: Gregor Michalicek Date: Mon, 12 Aug 2019 17:59:35 +0200 Subject: [PATCH] Add missing array initializations to eigen_soc/sorad.f90 The initializations are irrelevant for the production version but circumvent an erroneous stop due to missing initializations in the debugging version. The commit hopefully fixes issue #292. --- eigen_soc/sorad.f90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eigen_soc/sorad.f90 b/eigen_soc/sorad.f90 index 874c27d0..67f33f90 100644 --- a/eigen_soc/sorad.f90 +++ b/eigen_soc/sorad.f90 @@ -46,7 +46,11 @@ CONTAINS IF (atoms%jri(ntyp)>atoms%jmtd) CALL juDFT_error("atoms%jri(ntyp).GT.atoms%jmtd",calledby ="sorad") ALLOCATE ( p(atoms%jmtd,2),pd(atoms%jmtd,2),q(atoms%jmtd,2),plo(atoms%jmtd,2),fint(atoms%jmtd),& & qlo(atoms%jmtd,2),plop(atoms%jmtd,2),qd(atoms%jmtd,2),v0(atoms%jmtd),vso(atoms%jmtd,2) ) - ! + + p = 0.0 ; pd = 0.0 ; q = 0.0 ; plo = 0.0 ; fint = 0.0 + qlo = 0.0 ; plop = 0.0 ; qd = 0.0 ; v0 = 0.0 ; vso = 0.0 + + DO l = 0,atoms%lmax(ntyp) DO jspin = 1,input%jspins @@ -130,6 +134,7 @@ CONTAINS !+apw+lo IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate energy derivative (of order atoms%ulo_der) at e ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2)) + glo = 0.0 ; pqlo = 0.0 ; filo = 0.0 pqlo(1:atoms%jri(ntyp),1)=plo(1:atoms%jri(ntyp),jspin) pqlo(1:atoms%jri(ntyp),2)=qlo(1:atoms%jri(ntyp),jspin) i = atoms%ulo_der(ilo,ntyp) @@ -190,6 +195,7 @@ CONTAINS !+apw+lo IF (atoms%l_dulo(ilo,ntyp).OR.atoms%ulo_der(ilo,ntyp).GE.1) THEN ! calculate orthogonal energy derivative at e ALLOCATE (glo(atoms%jmtd,2),pqlo(atoms%jmtd,2),filo(atoms%jmtd,2)) + glo = 0.0 ; pqlo = 0.0 ; filo = 0.0 pqlo(1:atoms%jri(ntyp),1)=plop(1:atoms%jri(ntyp),jspin) pqlo(1:atoms%jri(ntyp),2)=q(1:atoms%jri(ntyp),1) i = atoms%ulo_der(ilo,ntyp) -- GitLab