Commit 9d7dd9cf authored by Gregor Michalicek's avatar Gregor Michalicek

Fixed array index bug in eigen/tlmplm_store.F90

With strict debugging options I got the error that index 3
of the array tuulo had a value larger than the upper bound. The
array indizes were not explicitely provided at that point and
that surely was wrong. I fixed that. The error is gone. However,
I don't understand how the actual error was caused by this.

Maybe there is still something else.
parent 1a05dbce
......@@ -73,13 +73,15 @@ CONTAINS
tdd=td_stored%tdd(:size(tuu,1),n,jspin)
ind=td_stored%ind(:size(ind,1),:size(ind,2),n,jspin)
IF (nlo(n)>0) THEN
mlo=sum(nlo(:n-1))+1
mlolo=dot_product(nlo(:n-1),nlo(:n-1)+2)/2+1
tuulo=td_stored%tuulo(:size(tuulo,1),:size(tuulo,2),mlo:mlo+nlo(n)-1,jspin)
tdulo=td_stored%tdulo(:size(tuulo,1),:size(tuulo,2),mlo:mlo+nlo(n)-1,jspin)
tuloulo=td_stored%tuloulo(:size(tuloulo,1),:size(tuloulo,2),mlolo:mlolo+nlo(n)*(nlo(n)+1)/2-1,jspin)
tuulo(:,:,mlo:(mlo+nlo(n)-1))=&
td_stored%tuulo(:size(tuulo,1),:size(tuulo,2),mlo:mlo+nlo(n)-1,jspin)
tdulo(:,:,mlo:(mlo+nlo(n)-1))=&
td_stored%tdulo(:size(tuulo,1),:size(tuulo,2),mlo:mlo+nlo(n)-1,jspin)
tuloulo(:,:,mlolo:mlolo+nlo(n)*(nlo(n)+1)/2-1)=&
td_stored%tuloulo(:size(tuloulo,1),:size(tuloulo,2),mlolo:mlolo+nlo(n)*(nlo(n)+1)/2-1,jspin)
ENDIF
IF(ldau(n)) THEN
nn=count(ldau(:n-1))+1
......
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