10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-15 18:43:51 +01:00

Merge pull request #304 from Ydrnan/dev-fix

fix bug restore_symmetry
This commit is contained in:
Anthony Scemama 2023-07-20 14:26:37 +02:00 committed by GitHub
commit 03b6ce807a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1661,7 +1661,15 @@ subroutine restore_symmetry(m,n,A,LDA,thresh)
! Update i
i = i + 1
enddo
copy(i:) = 0.d0
! To nullify the remaining elements that are below the threshold
if (i == sze) then
if (-copy(i) <= thresh) then
copy(i) = 0d0
endif
else
copy(i:) = 0.d0
endif
!$OMP PARALLEL if (sze>10000) &
!$OMP SHARED(m,sze,copy_sign,copy,key,A,ii,jj) &