mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Merge pull request #240 from Ydrnan/qp2_add
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
fix segfault restore_symmetry if all elem > thresh
This commit is contained in:
commit
1273c19897
@ -1736,7 +1736,7 @@ subroutine restore_symmetry(m,n,A,LDA,thresh)
|
||||
|
||||
! Symmetrize
|
||||
i = 1
|
||||
do while( (i < sze).and.(-copy(i) > thresh) )
|
||||
do while (i < sze)
|
||||
pi = i
|
||||
pf = i
|
||||
val = 1d0/copy(i)
|
||||
@ -1760,6 +1760,10 @@ subroutine restore_symmetry(m,n,A,LDA,thresh)
|
||||
! Update i
|
||||
i = pf
|
||||
endif
|
||||
|
||||
! Exit if the remaining elements are below thresh
|
||||
if (-copy(i) <= thresh) exit
|
||||
|
||||
! Update i
|
||||
i = i + 1
|
||||
enddo
|
||||
|
Loading…
Reference in New Issue
Block a user