mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-10 21:18:29 +01:00
OMP PARALLEL BUG
This commit is contained in:
parent
ac3f5f9893
commit
85dfee525b
@ -301,19 +301,19 @@ subroutine diagonalize_s2_betweenstates(keys_tmp,psi_coefs_inout,n,nmax_keys,nma
|
||||
print*,''
|
||||
print*,'nstates = ',nstates
|
||||
allocate(s2(nstates,nstates),overlap(nstates,nstates))
|
||||
!$OMP PARALLEL DO COLLAPSE(2) DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,j) SHARED(overlap,psi_coefs_inout,nstates,n)
|
||||
do i = 1, nstates
|
||||
do j = i+1, nstates
|
||||
if (i == j) then
|
||||
overlap(i,i) = u_dot_u(psi_coefs_inout(1,i),n)
|
||||
else
|
||||
overlap(i,j) = u_dot_v(psi_coefs_inout(1,j),psi_coefs_inout(1,i),n)
|
||||
overlap(j,i) = overlap(i,j)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL
|
||||
!$OMP PARALLEL DO COLLAPSE(2) DEFAULT(NONE) &
|
||||
!$OMP PRIVATE(i,j) SHARED(overlap,psi_coefs_inout,nstates,n)
|
||||
do i = 1, nstates
|
||||
do j = i+1, nstates
|
||||
if (i == j) then
|
||||
overlap(i,i) = u_dot_u(psi_coefs_inout(1,i),n)
|
||||
else
|
||||
overlap(i,j) = u_dot_v(psi_coefs_inout(1,j),psi_coefs_inout(1,i),n)
|
||||
overlap(j,i) = overlap(i,j)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
!$OMP END PARALLEL DO
|
||||
print*,'Overlap matrix in the basis of the states considered'
|
||||
do i = 1, nstates
|
||||
write(*,'(10(F16.10,X))')overlap(i,:)
|
||||
|
Loading…
Reference in New Issue
Block a user