Commit eaf2b850 authored by Matthias Redies's avatar Matthias Redies

forcetot is uninitialized if l_geo=false

parent 40193d03
......@@ -23,7 +23,6 @@ CONTAINS
TYPE(t_vacuum),INTENT(IN) :: vacuum
! ..
! .. Local Scalars ..
REAL,PARAMETER:: zero=0.0
REAL sum
INTEGER i,jsp,n,nat1,ierr
REAL eps_force
......@@ -61,11 +60,9 @@ CONTAINS
8005 FORMAT (/,' ***** TOTAL FORCES ON ATOMS ***** ',/)
IF (input%l_f) CALL openXMLElement('totalForcesOnRepresentativeAtoms',(/'units'/),(/'Htr/bohr'/))
nat1 = 1
forcetot = 0.0
DO n = 1,atoms%ntype
IF (atoms%l_geo(n)) THEN
DO i = 1,3
forcetot(i,n) = zero
END DO
DO jsp = 1,input%jspins
DO i = 1,3
forcetot(i,n) = forcetot(i,n) + results%force(i,n,jsp)
......
  • @tsep Your commit 54f71daa seems to use forcetot uninitialized if l_geo is false. Maybe you can check if my fix makes sense.

  • Never mind you just added the ;, i guess it's @wortmann then.

  • which ; ??

  • The git-blame for the line with the uninitialized jump pointed to this commit: 54f71daa

    But it turns out this commit only consists of an added ;

    I think i fixed the issue and everything should be fine

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment